orbital_ui 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +21 -0
  3. data/README.md +224 -0
  4. data/app/assets/config/orbital_ui_manifest.js +2 -0
  5. data/app/assets/javascripts/orbital_ui/index.js +6 -0
  6. data/app/assets/javascripts/orbital_ui/index.js.map +1 -0
  7. data/app/assets/stylesheets/orbital_ui/index.css +3 -0
  8. data/app/assets/stylesheets/orbital_ui/index.css.map +1 -0
  9. data/app/assets/stylesheets/orbital_ui/theme.css +113 -0
  10. data/app/assets/stylesheets/orbital_ui/themes/blue.css +43 -0
  11. data/app/assets/stylesheets/orbital_ui/themes/green.css +43 -0
  12. data/app/assets/stylesheets/orbital_ui/themes/orange.css +43 -0
  13. data/app/assets/stylesheets/orbital_ui/themes/rose.css +43 -0
  14. data/app/assets/stylesheets/orbital_ui/themes/violet.css +43 -0
  15. data/app/components/orbital_ui/accordion/item.rb +32 -0
  16. data/app/components/orbital_ui/accordion.rb +23 -0
  17. data/app/components/orbital_ui/alert.rb +80 -0
  18. data/app/components/orbital_ui/avatar.rb +87 -0
  19. data/app/components/orbital_ui/badge.rb +28 -0
  20. data/app/components/orbital_ui/button.rb +46 -0
  21. data/app/components/orbital_ui/button_group.rb +20 -0
  22. data/app/components/orbital_ui/card/action.rb +17 -0
  23. data/app/components/orbital_ui/card/content.rb +17 -0
  24. data/app/components/orbital_ui/card/description.rb +17 -0
  25. data/app/components/orbital_ui/card/footer.rb +17 -0
  26. data/app/components/orbital_ui/card/header.rb +25 -0
  27. data/app/components/orbital_ui/card/title.rb +17 -0
  28. data/app/components/orbital_ui/card.rb +30 -0
  29. data/app/components/orbital_ui/check_box.rb +59 -0
  30. data/app/components/orbital_ui/component.rb +12 -0
  31. data/app/components/orbital_ui/concerns/icon_prop.rb +14 -0
  32. data/app/components/orbital_ui/confirmation_dialog.rb +142 -0
  33. data/app/components/orbital_ui/delete_dialog.rb +143 -0
  34. data/app/components/orbital_ui/dialog.rb +46 -0
  35. data/app/components/orbital_ui/dialog_frame.rb +17 -0
  36. data/app/components/orbital_ui/dropdown.rb +58 -0
  37. data/app/components/orbital_ui/expander.rb +20 -0
  38. data/app/components/orbital_ui/grid.rb +22 -0
  39. data/app/components/orbital_ui/heading.rb +65 -0
  40. data/app/components/orbital_ui/icon.rb +21 -0
  41. data/app/components/orbital_ui/image.rb +26 -0
  42. data/app/components/orbital_ui/inline_stack.rb +31 -0
  43. data/app/components/orbital_ui/kbd.rb +15 -0
  44. data/app/components/orbital_ui/kbd_group.rb +15 -0
  45. data/app/components/orbital_ui/menu/item.rb +74 -0
  46. data/app/components/orbital_ui/menu/label.rb +20 -0
  47. data/app/components/orbital_ui/menu/separator.rb +21 -0
  48. data/app/components/orbital_ui/menu/sub.rb +68 -0
  49. data/app/components/orbital_ui/menu.rb +36 -0
  50. data/app/components/orbital_ui/modal.rb +36 -0
  51. data/app/components/orbital_ui/modal_frame.rb +17 -0
  52. data/app/components/orbital_ui/navigation_menu.rb +51 -0
  53. data/app/components/orbital_ui/popcard.rb +18 -0
  54. data/app/components/orbital_ui/popover.rb +50 -0
  55. data/app/components/orbital_ui/progress_bar.rb +33 -0
  56. data/app/components/orbital_ui/prose.rb +15 -0
  57. data/app/components/orbital_ui/select.rb +140 -0
  58. data/app/components/orbital_ui/separator.rb +22 -0
  59. data/app/components/orbital_ui/spinner.rb +14 -0
  60. data/app/components/orbital_ui/stack.rb +29 -0
  61. data/app/components/orbital_ui/text.rb +41 -0
  62. data/app/components/orbital_ui/text_field.rb +132 -0
  63. data/app/components/orbital_ui/tooltip.rb +42 -0
  64. data/app/components/orbital_ui/typography.rb +38 -0
  65. data/lib/orbital_ui/attribute_utils.rb +152 -0
  66. data/lib/orbital_ui/components/attributes.rb +164 -0
  67. data/lib/orbital_ui/components/styles.rb +40 -0
  68. data/lib/orbital_ui/engine.rb +7 -0
  69. data/lib/orbital_ui/icons.rb +17312 -0
  70. data/lib/orbital_ui/type/any.rb +17 -0
  71. data/lib/orbital_ui/type/array.rb +27 -0
  72. data/lib/orbital_ui/type/breakpoints.rb +46 -0
  73. data/lib/orbital_ui/type/symbol.rb +17 -0
  74. data/lib/orbital_ui/version.rb +5 -0
  75. data/lib/orbital_ui.rb +49 -0
  76. metadata +162 -0
@@ -0,0 +1 @@
1
+ {"mappings":"C,A,eYyEI,EXvEA,CCEJ,OAAM,EACF,YAAY,CAAW,CAAE,CAAS,CAAE,CAAY,CAAE,CAC9C,IAAI,CAAC,WAAW,CAAG,EACnB,IAAI,CAAC,SAAS,CAAG,EACjB,IAAI,CAAC,YAAY,CAAG,EACpB,IAAI,CAAC,iBAAiB,CAAG,IAAI,GACjC,CACA,SAAU,CACN,IAAI,CAAC,WAAW,CAAC,gBAAgB,CAAC,IAAI,CAAC,SAAS,CAAE,IAAI,CAAE,IAAI,CAAC,YAAY,CAC7E,CACA,YAAa,CACT,IAAI,CAAC,WAAW,CAAC,mBAAmB,CAAC,IAAI,CAAC,SAAS,CAAE,IAAI,CAAE,IAAI,CAAC,YAAY,CAChF,CACA,iBAAiB,CAAO,CAAE,CACtB,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,EAC/B,CACA,oBAAoB,CAAO,CAAE,CACzB,IAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC,EAClC,CACA,YAAY,CAAK,CAAE,CACf,IAAM,EAAgB,AAoB9B,SAAqB,CAAK,EACtB,GAAI,gCAAiC,EACjC,OAAO,CAEN,EACD,GAAM,CAAA,yBAAE,CAAwB,CAAE,CAAG,EACrC,OAAO,OAAO,MAAM,CAAC,EAAO,CACxB,4BAA6B,CAAA,EAC7B,2BACI,IAAI,CAAC,2BAA2B,CAAG,CAAA,EACnC,EAAyB,IAAI,CAAC,IAAI,CACtC,CACJ,EACJ,CACJ,EAlC0C,GAClC,IAAK,IAAM,KAAW,IAAI,CAAC,QAAQ,CAC/B,GAAI,EAAc,2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IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,aAAa,CAC1C,CACF,GZtEA,SAAS,gBAAgB,CAAC,QAAS,AAAC,IAClC,IAAM,EAAU,EAAM,MAAM,CAAC,OAAO,CAAC,yCACrC,GAAI,CAAC,EAAS,OAEd,EAAM,cAAc,GACpB,IAAM,EAAK,EAAQ,OAAO,CAAC,SAAS,EAAI,EAAQ,OAAO,CAAC,UAAU,CAC5D,EAAQ,SAAS,cAAc,CAAC,GACtC,GAAI,CAAC,EAAO,OAEZ,IAAM,EAAa,EAAY,oCAAoC,CAAC,EAAO,gBACvE,CAAA,GAAY,EAAW,IAAI,EACjC,E","sources":["<anon>","frontend/javascript/index.js","node_modules/@hotwired/stimulus/dist/stimulus.js","frontend/javascript/controllers/accordion_controller.js","frontend/javascript/controllers/avatar_controller.js","frontend/javascript/controllers/menu_controller.js","frontend/javascript/controllers/menu_sub_controller.js","frontend/javascript/controllers/modal_controller.js","frontend/javascript/controllers/popover_controller.js","node_modules/@floating-ui/dom/dist/floating-ui.dom.esm.js","node_modules/@floating-ui/core/dist/floating-ui.core.esm.js","node_modules/@floating-ui/utils/dist/floating-ui.utils.esm.js","node_modules/@floating-ui/utils/dom/floating-ui.utils.dom.esm.js","frontend/javascript/controllers/select_controller.js"],"sourcesContent":["(function () {\n/*\nStimulus 3.2.1\nCopyright © 2023 Basecamp, LLC\n */ class $27d274cf1203127c$var$EventListener {\n constructor(eventTarget, eventName, eventOptions){\n this.eventTarget = eventTarget;\n this.eventName = eventName;\n this.eventOptions = eventOptions;\n this.unorderedBindings = new Set();\n }\n connect() {\n this.eventTarget.addEventListener(this.eventName, this, this.eventOptions);\n }\n disconnect() {\n this.eventTarget.removeEventListener(this.eventName, this, this.eventOptions);\n }\n bindingConnected(binding) {\n this.unorderedBindings.add(binding);\n }\n bindingDisconnected(binding) {\n this.unorderedBindings.delete(binding);\n }\n handleEvent(event) {\n const extendedEvent = $27d274cf1203127c$var$extendEvent(event);\n for (const binding of this.bindings){\n if (extendedEvent.immediatePropagationStopped) break;\n else binding.handleEvent(extendedEvent);\n }\n }\n hasBindings() {\n return this.unorderedBindings.size > 0;\n }\n get bindings() {\n return Array.from(this.unorderedBindings).sort((left, right)=>{\n const leftIndex = left.index, rightIndex = right.index;\n return leftIndex < rightIndex ? -1 : leftIndex > rightIndex ? 1 : 0;\n });\n }\n}\nfunction $27d274cf1203127c$var$extendEvent(event) {\n if (\"immediatePropagationStopped\" in event) return event;\n else {\n const { stopImmediatePropagation: stopImmediatePropagation } = event;\n return Object.assign(event, {\n immediatePropagationStopped: false,\n stopImmediatePropagation () {\n this.immediatePropagationStopped = true;\n stopImmediatePropagation.call(this);\n }\n });\n }\n}\nclass $27d274cf1203127c$var$Dispatcher {\n constructor(application){\n this.application = application;\n this.eventListenerMaps = new Map();\n this.started = false;\n }\n start() {\n if (!this.started) {\n this.started = true;\n this.eventListeners.forEach((eventListener)=>eventListener.connect());\n }\n }\n stop() {\n if (this.started) {\n this.started = false;\n this.eventListeners.forEach((eventListener)=>eventListener.disconnect());\n }\n }\n get eventListeners() {\n return Array.from(this.eventListenerMaps.values()).reduce((listeners, map)=>listeners.concat(Array.from(map.values())), []);\n }\n bindingConnected(binding) {\n this.fetchEventListenerForBinding(binding).bindingConnected(binding);\n }\n bindingDisconnected(binding, clearEventListeners = false) {\n this.fetchEventListenerForBinding(binding).bindingDisconnected(binding);\n if (clearEventListeners) this.clearEventListenersForBinding(binding);\n }\n handleError(error, message, detail = {}) {\n this.application.handleError(error, `Error ${message}`, detail);\n }\n clearEventListenersForBinding(binding) {\n const eventListener = this.fetchEventListenerForBinding(binding);\n if (!eventListener.hasBindings()) {\n eventListener.disconnect();\n this.removeMappedEventListenerFor(binding);\n }\n }\n removeMappedEventListenerFor(binding) {\n const { eventTarget: eventTarget, eventName: eventName, eventOptions: eventOptions } = binding;\n const eventListenerMap = this.fetchEventListenerMapForEventTarget(eventTarget);\n const cacheKey = this.cacheKey(eventName, eventOptions);\n eventListenerMap.delete(cacheKey);\n if (eventListenerMap.size == 0) this.eventListenerMaps.delete(eventTarget);\n }\n fetchEventListenerForBinding(binding) {\n const { eventTarget: eventTarget, eventName: eventName, eventOptions: eventOptions } = binding;\n return this.fetchEventListener(eventTarget, eventName, eventOptions);\n }\n fetchEventListener(eventTarget, eventName, eventOptions) {\n const eventListenerMap = this.fetchEventListenerMapForEventTarget(eventTarget);\n const cacheKey = this.cacheKey(eventName, eventOptions);\n let eventListener = eventListenerMap.get(cacheKey);\n if (!eventListener) {\n eventListener = this.createEventListener(eventTarget, eventName, eventOptions);\n eventListenerMap.set(cacheKey, eventListener);\n }\n return eventListener;\n }\n createEventListener(eventTarget, eventName, eventOptions) {\n const eventListener = new $27d274cf1203127c$var$EventListener(eventTarget, eventName, eventOptions);\n if (this.started) eventListener.connect();\n return eventListener;\n }\n fetchEventListenerMapForEventTarget(eventTarget) {\n let eventListenerMap = this.eventListenerMaps.get(eventTarget);\n if (!eventListenerMap) {\n eventListenerMap = new Map();\n this.eventListenerMaps.set(eventTarget, eventListenerMap);\n }\n return eventListenerMap;\n }\n cacheKey(eventName, eventOptions) {\n const parts = [\n eventName\n ];\n Object.keys(eventOptions).sort().forEach((key)=>{\n parts.push(`${eventOptions[key] ? \"\" : \"!\"}${key}`);\n });\n return parts.join(\":\");\n }\n}\nconst $27d274cf1203127c$var$defaultActionDescriptorFilters = {\n stop ({ event: event, value: value }) {\n if (value) event.stopPropagation();\n return true;\n },\n prevent ({ event: event, value: value }) {\n if (value) event.preventDefault();\n return true;\n },\n self ({ event: event, value: value, element: element }) {\n if (value) return element === event.target;\n else return true;\n }\n};\nconst $27d274cf1203127c$var$descriptorPattern = /^(?:(?:([^.]+?)\\+)?(.+?)(?:\\.(.+?))?(?:@(window|document))?->)?(.+?)(?:#([^:]+?))(?::(.+))?$/;\nfunction $27d274cf1203127c$var$parseActionDescriptorString(descriptorString) {\n const source = descriptorString.trim();\n const matches = source.match($27d274cf1203127c$var$descriptorPattern) || [];\n let eventName = matches[2];\n let keyFilter = matches[3];\n if (keyFilter && ![\n \"keydown\",\n \"keyup\",\n \"keypress\"\n ].includes(eventName)) {\n eventName += `.${keyFilter}`;\n keyFilter = \"\";\n }\n return {\n eventTarget: $27d274cf1203127c$var$parseEventTarget(matches[4]),\n eventName: eventName,\n eventOptions: matches[7] ? $27d274cf1203127c$var$parseEventOptions(matches[7]) : {},\n identifier: matches[5],\n methodName: matches[6],\n keyFilter: matches[1] || keyFilter\n };\n}\nfunction $27d274cf1203127c$var$parseEventTarget(eventTargetName) {\n if (eventTargetName == \"window\") return window;\n else if (eventTargetName == \"document\") return document;\n}\nfunction $27d274cf1203127c$var$parseEventOptions(eventOptions) {\n return eventOptions.split(\":\").reduce((options, token)=>Object.assign(options, {\n [token.replace(/^!/, \"\")]: !/^!/.test(token)\n }), {});\n}\nfunction $27d274cf1203127c$var$stringifyEventTarget(eventTarget) {\n if (eventTarget == window) return \"window\";\n else if (eventTarget == document) return \"document\";\n}\nfunction $27d274cf1203127c$var$camelize(value) {\n return value.replace(/(?:[_-])([a-z0-9])/g, (_, char)=>char.toUpperCase());\n}\nfunction $27d274cf1203127c$var$namespaceCamelize(value) {\n return $27d274cf1203127c$var$camelize(value.replace(/--/g, \"-\").replace(/__/g, \"_\"));\n}\nfunction $27d274cf1203127c$var$capitalize(value) {\n return value.charAt(0).toUpperCase() + value.slice(1);\n}\nfunction $27d274cf1203127c$var$dasherize(value) {\n return value.replace(/([A-Z])/g, (_, char)=>`-${char.toLowerCase()}`);\n}\nfunction $27d274cf1203127c$var$tokenize(value) {\n return value.match(/[^\\s]+/g) || [];\n}\nfunction $27d274cf1203127c$var$isSomething(object) {\n return object !== null && object !== undefined;\n}\nfunction $27d274cf1203127c$var$hasProperty(object, property) {\n return Object.prototype.hasOwnProperty.call(object, property);\n}\nconst $27d274cf1203127c$var$allModifiers = [\n \"meta\",\n \"ctrl\",\n \"alt\",\n \"shift\"\n];\nclass $27d274cf1203127c$var$Action {\n constructor(element, index, descriptor, schema){\n this.element = element;\n this.index = index;\n this.eventTarget = descriptor.eventTarget || element;\n this.eventName = descriptor.eventName || $27d274cf1203127c$var$getDefaultEventNameForElement(element) || $27d274cf1203127c$var$error(\"missing event name\");\n this.eventOptions = descriptor.eventOptions || {};\n this.identifier = descriptor.identifier || $27d274cf1203127c$var$error(\"missing identifier\");\n this.methodName = descriptor.methodName || $27d274cf1203127c$var$error(\"missing method name\");\n this.keyFilter = descriptor.keyFilter || \"\";\n this.schema = schema;\n }\n static forToken(token, schema) {\n return new this(token.element, token.index, $27d274cf1203127c$var$parseActionDescriptorString(token.content), schema);\n }\n toString() {\n const eventFilter = this.keyFilter ? `.${this.keyFilter}` : \"\";\n const eventTarget = this.eventTargetName ? `@${this.eventTargetName}` : \"\";\n return `${this.eventName}${eventFilter}${eventTarget}->${this.identifier}#${this.methodName}`;\n }\n shouldIgnoreKeyboardEvent(event) {\n if (!this.keyFilter) return false;\n const filters = this.keyFilter.split(\"+\");\n if (this.keyFilterDissatisfied(event, filters)) return true;\n const standardFilter = filters.filter((key)=>!$27d274cf1203127c$var$allModifiers.includes(key))[0];\n if (!standardFilter) return false;\n if (!$27d274cf1203127c$var$hasProperty(this.keyMappings, standardFilter)) $27d274cf1203127c$var$error(`contains unknown key filter: ${this.keyFilter}`);\n return this.keyMappings[standardFilter].toLowerCase() !== event.key.toLowerCase();\n }\n shouldIgnoreMouseEvent(event) {\n if (!this.keyFilter) return false;\n const filters = [\n this.keyFilter\n ];\n if (this.keyFilterDissatisfied(event, filters)) return true;\n return false;\n }\n get params() {\n const params = {};\n const pattern = new RegExp(`^data-${this.identifier}-(.+)-param$`, \"i\");\n for (const { name: name, value: value } of Array.from(this.element.attributes)){\n const match = name.match(pattern);\n const key = match && match[1];\n if (key) params[$27d274cf1203127c$var$camelize(key)] = $27d274cf1203127c$var$typecast(value);\n }\n return params;\n }\n get eventTargetName() {\n return $27d274cf1203127c$var$stringifyEventTarget(this.eventTarget);\n }\n get keyMappings() {\n return this.schema.keyMappings;\n }\n keyFilterDissatisfied(event, filters) {\n const [meta, ctrl, alt, shift] = $27d274cf1203127c$var$allModifiers.map((modifier)=>filters.includes(modifier));\n return event.metaKey !== meta || event.ctrlKey !== ctrl || event.altKey !== alt || event.shiftKey !== shift;\n }\n}\nconst $27d274cf1203127c$var$defaultEventNames = {\n a: ()=>\"click\",\n button: ()=>\"click\",\n form: ()=>\"submit\",\n details: ()=>\"toggle\",\n input: (e)=>e.getAttribute(\"type\") == \"submit\" ? \"click\" : \"input\",\n select: ()=>\"change\",\n textarea: ()=>\"input\"\n};\nfunction $27d274cf1203127c$var$getDefaultEventNameForElement(element) {\n const tagName = element.tagName.toLowerCase();\n if (tagName in $27d274cf1203127c$var$defaultEventNames) return $27d274cf1203127c$var$defaultEventNames[tagName](element);\n}\nfunction $27d274cf1203127c$var$error(message) {\n throw new Error(message);\n}\nfunction $27d274cf1203127c$var$typecast(value) {\n try {\n return JSON.parse(value);\n } catch (o_O) {\n return value;\n }\n}\nclass $27d274cf1203127c$var$Binding {\n constructor(context, action){\n this.context = context;\n this.action = action;\n }\n get index() {\n return this.action.index;\n }\n get eventTarget() {\n return this.action.eventTarget;\n }\n get eventOptions() {\n return this.action.eventOptions;\n }\n get identifier() {\n return this.context.identifier;\n }\n handleEvent(event) {\n const actionEvent = this.prepareActionEvent(event);\n if (this.willBeInvokedByEvent(event) && this.applyEventModifiers(actionEvent)) this.invokeWithEvent(actionEvent);\n }\n get eventName() {\n return this.action.eventName;\n }\n get method() {\n const method = this.controller[this.methodName];\n if (typeof method == \"function\") return method;\n throw new Error(`Action \"${this.action}\" references undefined method \"${this.methodName}\"`);\n }\n applyEventModifiers(event) {\n const { element: element } = this.action;\n const { actionDescriptorFilters: actionDescriptorFilters } = this.context.application;\n const { controller: controller } = this.context;\n let passes = true;\n for (const [name, value] of Object.entries(this.eventOptions)){\n if (name in actionDescriptorFilters) {\n const filter = actionDescriptorFilters[name];\n passes = passes && filter({\n name: name,\n value: value,\n event: event,\n element: element,\n controller: controller\n });\n } else continue;\n }\n return passes;\n }\n prepareActionEvent(event) {\n return Object.assign(event, {\n params: this.action.params\n });\n }\n invokeWithEvent(event) {\n const { target: target, currentTarget: currentTarget } = event;\n try {\n this.method.call(this.controller, event);\n this.context.logDebugActivity(this.methodName, {\n event: event,\n target: target,\n currentTarget: currentTarget,\n action: this.methodName\n });\n } catch (error) {\n const { identifier: identifier, controller: controller, element: element, index: index } = this;\n const detail = {\n identifier: identifier,\n controller: controller,\n element: element,\n index: index,\n event: event\n };\n this.context.handleError(error, `invoking action \"${this.action}\"`, detail);\n }\n }\n willBeInvokedByEvent(event) {\n const eventTarget = event.target;\n if (event instanceof KeyboardEvent && this.action.shouldIgnoreKeyboardEvent(event)) return false;\n if (event instanceof MouseEvent && this.action.shouldIgnoreMouseEvent(event)) return false;\n if (this.element === eventTarget) return true;\n else if (eventTarget instanceof Element && this.element.contains(eventTarget)) return this.scope.containsElement(eventTarget);\n else return this.scope.containsElement(this.action.element);\n }\n get controller() {\n return this.context.controller;\n }\n get methodName() {\n return this.action.methodName;\n }\n get element() {\n return this.scope.element;\n }\n get scope() {\n return this.context.scope;\n }\n}\nclass $27d274cf1203127c$export$12e07a2a9f87578a {\n constructor(element, delegate){\n this.mutationObserverInit = {\n attributes: true,\n childList: true,\n subtree: true\n };\n this.element = element;\n this.started = false;\n this.delegate = delegate;\n this.elements = new Set();\n this.mutationObserver = new MutationObserver((mutations)=>this.processMutations(mutations));\n }\n start() {\n if (!this.started) {\n this.started = true;\n this.mutationObserver.observe(this.element, this.mutationObserverInit);\n this.refresh();\n }\n }\n pause(callback) {\n if (this.started) {\n this.mutationObserver.disconnect();\n this.started = false;\n }\n callback();\n if (!this.started) {\n this.mutationObserver.observe(this.element, this.mutationObserverInit);\n this.started = true;\n }\n }\n stop() {\n if (this.started) {\n this.mutationObserver.takeRecords();\n this.mutationObserver.disconnect();\n this.started = false;\n }\n }\n refresh() {\n if (this.started) {\n const matches = new Set(this.matchElementsInTree());\n for (const element of Array.from(this.elements))if (!matches.has(element)) this.removeElement(element);\n for (const element of Array.from(matches))this.addElement(element);\n }\n }\n processMutations(mutations) {\n if (this.started) for (const mutation of mutations)this.processMutation(mutation);\n }\n processMutation(mutation) {\n if (mutation.type == \"attributes\") this.processAttributeChange(mutation.target, mutation.attributeName);\n else if (mutation.type == \"childList\") {\n this.processRemovedNodes(mutation.removedNodes);\n this.processAddedNodes(mutation.addedNodes);\n }\n }\n processAttributeChange(element, attributeName) {\n if (this.elements.has(element)) {\n if (this.delegate.elementAttributeChanged && this.matchElement(element)) this.delegate.elementAttributeChanged(element, attributeName);\n else this.removeElement(element);\n } else if (this.matchElement(element)) this.addElement(element);\n }\n processRemovedNodes(nodes) {\n for (const node of Array.from(nodes)){\n const element = this.elementFromNode(node);\n if (element) this.processTree(element, this.removeElement);\n }\n }\n processAddedNodes(nodes) {\n for (const node of Array.from(nodes)){\n const element = this.elementFromNode(node);\n if (element && this.elementIsActive(element)) this.processTree(element, this.addElement);\n }\n }\n matchElement(element) {\n return this.delegate.matchElement(element);\n }\n matchElementsInTree(tree = this.element) {\n return this.delegate.matchElementsInTree(tree);\n }\n processTree(tree, processor) {\n for (const element of this.matchElementsInTree(tree))processor.call(this, element);\n }\n elementFromNode(node) {\n if (node.nodeType == Node.ELEMENT_NODE) return node;\n }\n elementIsActive(element) {\n if (element.isConnected != this.element.isConnected) return false;\n else return this.element.contains(element);\n }\n addElement(element) {\n if (!this.elements.has(element)) {\n if (this.elementIsActive(element)) {\n this.elements.add(element);\n if (this.delegate.elementMatched) this.delegate.elementMatched(element);\n }\n }\n }\n removeElement(element) {\n if (this.elements.has(element)) {\n this.elements.delete(element);\n if (this.delegate.elementUnmatched) this.delegate.elementUnmatched(element);\n }\n }\n}\nclass $27d274cf1203127c$export$fe68319d413d05cb {\n constructor(element, attributeName, delegate){\n this.attributeName = attributeName;\n this.delegate = delegate;\n this.elementObserver = new $27d274cf1203127c$export$12e07a2a9f87578a(element, this);\n }\n get element() {\n return this.elementObserver.element;\n }\n get selector() {\n return `[${this.attributeName}]`;\n }\n start() {\n this.elementObserver.start();\n }\n pause(callback) {\n this.elementObserver.pause(callback);\n }\n stop() {\n this.elementObserver.stop();\n }\n refresh() {\n this.elementObserver.refresh();\n }\n get started() {\n return this.elementObserver.started;\n }\n matchElement(element) {\n return element.hasAttribute(this.attributeName);\n }\n matchElementsInTree(tree) {\n const match = this.matchElement(tree) ? [\n tree\n ] : [];\n const matches = Array.from(tree.querySelectorAll(this.selector));\n return match.concat(matches);\n }\n elementMatched(element) {\n if (this.delegate.elementMatchedAttribute) this.delegate.elementMatchedAttribute(element, this.attributeName);\n }\n elementUnmatched(element) {\n if (this.delegate.elementUnmatchedAttribute) this.delegate.elementUnmatchedAttribute(element, this.attributeName);\n }\n elementAttributeChanged(element, attributeName) {\n if (this.delegate.elementAttributeValueChanged && this.attributeName == attributeName) this.delegate.elementAttributeValueChanged(element, attributeName);\n }\n}\nfunction $27d274cf1203127c$export$e16d8520af44a096(map, key, value) {\n $27d274cf1203127c$export$e7aa7bc5c1b3cfb3(map, key).add(value);\n}\nfunction $27d274cf1203127c$export$1d2f21e549771e67(map, key, value) {\n $27d274cf1203127c$export$e7aa7bc5c1b3cfb3(map, key).delete(value);\n $27d274cf1203127c$export$d6cf75919f12ca5a(map, key);\n}\nfunction $27d274cf1203127c$export$e7aa7bc5c1b3cfb3(map, key) {\n let values = map.get(key);\n if (!values) {\n values = new Set();\n map.set(key, values);\n }\n return values;\n}\nfunction $27d274cf1203127c$export$d6cf75919f12ca5a(map, key) {\n const values = map.get(key);\n if (values != null && values.size == 0) map.delete(key);\n}\nclass $27d274cf1203127c$export$8bd4ad37b76db6ba {\n constructor(){\n this.valuesByKey = new Map();\n }\n get keys() {\n return Array.from(this.valuesByKey.keys());\n }\n get values() {\n const sets = Array.from(this.valuesByKey.values());\n return sets.reduce((values, set)=>values.concat(Array.from(set)), []);\n }\n get size() {\n const sets = Array.from(this.valuesByKey.values());\n return sets.reduce((size, set)=>size + set.size, 0);\n }\n add(key, value) {\n $27d274cf1203127c$export$e16d8520af44a096(this.valuesByKey, key, value);\n }\n delete(key, value) {\n $27d274cf1203127c$export$1d2f21e549771e67(this.valuesByKey, key, value);\n }\n has(key, value) {\n const values = this.valuesByKey.get(key);\n return values != null && values.has(value);\n }\n hasKey(key) {\n return this.valuesByKey.has(key);\n }\n hasValue(value) {\n const sets = Array.from(this.valuesByKey.values());\n return sets.some((set)=>set.has(value));\n }\n getValuesForKey(key) {\n const values = this.valuesByKey.get(key);\n return values ? Array.from(values) : [];\n }\n getKeysForValue(value) {\n return Array.from(this.valuesByKey).filter(([_key, values])=>values.has(value)).map(([key, _values])=>key);\n }\n}\nclass $27d274cf1203127c$export$a7c3d2c2552a674d extends $27d274cf1203127c$export$8bd4ad37b76db6ba {\n constructor(){\n super();\n this.keysByValue = new Map();\n }\n get values() {\n return Array.from(this.keysByValue.keys());\n }\n add(key, value) {\n super.add(key, value);\n $27d274cf1203127c$export$e16d8520af44a096(this.keysByValue, value, key);\n }\n delete(key, value) {\n super.delete(key, value);\n $27d274cf1203127c$export$1d2f21e549771e67(this.keysByValue, value, key);\n }\n hasValue(value) {\n return this.keysByValue.has(value);\n }\n getKeysForValue(value) {\n const set = this.keysByValue.get(value);\n return set ? Array.from(set) : [];\n }\n}\nclass $27d274cf1203127c$export$116e0b48509995b {\n constructor(element, selector, delegate, details){\n this._selector = selector;\n this.details = details;\n this.elementObserver = new $27d274cf1203127c$export$12e07a2a9f87578a(element, this);\n this.delegate = delegate;\n this.matchesByElement = new $27d274cf1203127c$export$8bd4ad37b76db6ba();\n }\n get started() {\n return this.elementObserver.started;\n }\n get selector() {\n return this._selector;\n }\n set selector(selector) {\n this._selector = selector;\n this.refresh();\n }\n start() {\n this.elementObserver.start();\n }\n pause(callback) {\n this.elementObserver.pause(callback);\n }\n stop() {\n this.elementObserver.stop();\n }\n refresh() {\n this.elementObserver.refresh();\n }\n get element() {\n return this.elementObserver.element;\n }\n matchElement(element) {\n const { selector: selector } = this;\n if (selector) {\n const matches = element.matches(selector);\n if (this.delegate.selectorMatchElement) return matches && this.delegate.selectorMatchElement(element, this.details);\n return matches;\n } else return false;\n }\n matchElementsInTree(tree) {\n const { selector: selector } = this;\n if (selector) {\n const match = this.matchElement(tree) ? [\n tree\n ] : [];\n const matches = Array.from(tree.querySelectorAll(selector)).filter((match)=>this.matchElement(match));\n return match.concat(matches);\n } else return [];\n }\n elementMatched(element) {\n const { selector: selector } = this;\n if (selector) this.selectorMatched(element, selector);\n }\n elementUnmatched(element) {\n const selectors = this.matchesByElement.getKeysForValue(element);\n for (const selector of selectors)this.selectorUnmatched(element, selector);\n }\n elementAttributeChanged(element, _attributeName) {\n const { selector: selector } = this;\n if (selector) {\n const matches = this.matchElement(element);\n const matchedBefore = this.matchesByElement.has(selector, element);\n if (matches && !matchedBefore) this.selectorMatched(element, selector);\n else if (!matches && matchedBefore) this.selectorUnmatched(element, selector);\n }\n }\n selectorMatched(element, selector) {\n this.delegate.selectorMatched(element, selector, this.details);\n this.matchesByElement.add(selector, element);\n }\n selectorUnmatched(element, selector) {\n this.delegate.selectorUnmatched(element, selector, this.details);\n this.matchesByElement.delete(selector, element);\n }\n}\nclass $27d274cf1203127c$export$da226bebbf7f6caa {\n constructor(element, delegate){\n this.element = element;\n this.delegate = delegate;\n this.started = false;\n this.stringMap = new Map();\n this.mutationObserver = new MutationObserver((mutations)=>this.processMutations(mutations));\n }\n start() {\n if (!this.started) {\n this.started = true;\n this.mutationObserver.observe(this.element, {\n attributes: true,\n attributeOldValue: true\n });\n this.refresh();\n }\n }\n stop() {\n if (this.started) {\n this.mutationObserver.takeRecords();\n this.mutationObserver.disconnect();\n this.started = false;\n }\n }\n refresh() {\n if (this.started) for (const attributeName of this.knownAttributeNames)this.refreshAttribute(attributeName, null);\n }\n processMutations(mutations) {\n if (this.started) for (const mutation of mutations)this.processMutation(mutation);\n }\n processMutation(mutation) {\n const attributeName = mutation.attributeName;\n if (attributeName) this.refreshAttribute(attributeName, mutation.oldValue);\n }\n refreshAttribute(attributeName, oldValue) {\n const key = this.delegate.getStringMapKeyForAttribute(attributeName);\n if (key != null) {\n if (!this.stringMap.has(attributeName)) this.stringMapKeyAdded(key, attributeName);\n const value = this.element.getAttribute(attributeName);\n if (this.stringMap.get(attributeName) != value) this.stringMapValueChanged(value, key, oldValue);\n if (value == null) {\n const oldValue = this.stringMap.get(attributeName);\n this.stringMap.delete(attributeName);\n if (oldValue) this.stringMapKeyRemoved(key, attributeName, oldValue);\n } else this.stringMap.set(attributeName, value);\n }\n }\n stringMapKeyAdded(key, attributeName) {\n if (this.delegate.stringMapKeyAdded) this.delegate.stringMapKeyAdded(key, attributeName);\n }\n stringMapValueChanged(value, key, oldValue) {\n if (this.delegate.stringMapValueChanged) this.delegate.stringMapValueChanged(value, key, oldValue);\n }\n stringMapKeyRemoved(key, attributeName, oldValue) {\n if (this.delegate.stringMapKeyRemoved) this.delegate.stringMapKeyRemoved(key, attributeName, oldValue);\n }\n get knownAttributeNames() {\n return Array.from(new Set(this.currentAttributeNames.concat(this.recordedAttributeNames)));\n }\n get currentAttributeNames() {\n return Array.from(this.element.attributes).map((attribute)=>attribute.name);\n }\n get recordedAttributeNames() {\n return Array.from(this.stringMap.keys());\n }\n}\nclass $27d274cf1203127c$export$3aa21c2f03ef6b3b {\n constructor(element, attributeName, delegate){\n this.attributeObserver = new $27d274cf1203127c$export$fe68319d413d05cb(element, attributeName, this);\n this.delegate = delegate;\n this.tokensByElement = new $27d274cf1203127c$export$8bd4ad37b76db6ba();\n }\n get started() {\n return this.attributeObserver.started;\n }\n start() {\n this.attributeObserver.start();\n }\n pause(callback) {\n this.attributeObserver.pause(callback);\n }\n stop() {\n this.attributeObserver.stop();\n }\n refresh() {\n this.attributeObserver.refresh();\n }\n get element() {\n return this.attributeObserver.element;\n }\n get attributeName() {\n return this.attributeObserver.attributeName;\n }\n elementMatchedAttribute(element) {\n this.tokensMatched(this.readTokensForElement(element));\n }\n elementAttributeValueChanged(element) {\n const [unmatchedTokens, matchedTokens] = this.refreshTokensForElement(element);\n this.tokensUnmatched(unmatchedTokens);\n this.tokensMatched(matchedTokens);\n }\n elementUnmatchedAttribute(element) {\n this.tokensUnmatched(this.tokensByElement.getValuesForKey(element));\n }\n tokensMatched(tokens) {\n tokens.forEach((token)=>this.tokenMatched(token));\n }\n tokensUnmatched(tokens) {\n tokens.forEach((token)=>this.tokenUnmatched(token));\n }\n tokenMatched(token) {\n this.delegate.tokenMatched(token);\n this.tokensByElement.add(token.element, token);\n }\n tokenUnmatched(token) {\n this.delegate.tokenUnmatched(token);\n this.tokensByElement.delete(token.element, token);\n }\n refreshTokensForElement(element) {\n const previousTokens = this.tokensByElement.getValuesForKey(element);\n const currentTokens = this.readTokensForElement(element);\n const firstDifferingIndex = $27d274cf1203127c$var$zip(previousTokens, currentTokens).findIndex(([previousToken, currentToken])=>!$27d274cf1203127c$var$tokensAreEqual(previousToken, currentToken));\n if (firstDifferingIndex == -1) return [\n [],\n []\n ];\n else return [\n previousTokens.slice(firstDifferingIndex),\n currentTokens.slice(firstDifferingIndex)\n ];\n }\n readTokensForElement(element) {\n const attributeName = this.attributeName;\n const tokenString = element.getAttribute(attributeName) || \"\";\n return $27d274cf1203127c$var$parseTokenString(tokenString, element, attributeName);\n }\n}\nfunction $27d274cf1203127c$var$parseTokenString(tokenString, element, attributeName) {\n return tokenString.trim().split(/\\s+/).filter((content)=>content.length).map((content, index)=>({\n element: element,\n attributeName: attributeName,\n content: content,\n index: index\n }));\n}\nfunction $27d274cf1203127c$var$zip(left, right) {\n const length = Math.max(left.length, right.length);\n return Array.from({\n length: length\n }, (_, index)=>[\n left[index],\n right[index]\n ]);\n}\nfunction $27d274cf1203127c$var$tokensAreEqual(left, right) {\n return left && right && left.index == right.index && left.content == right.content;\n}\nclass $27d274cf1203127c$export$d27fa4c7330a452e {\n constructor(element, attributeName, delegate){\n this.tokenListObserver = new $27d274cf1203127c$export$3aa21c2f03ef6b3b(element, attributeName, this);\n this.delegate = delegate;\n this.parseResultsByToken = new WeakMap();\n this.valuesByTokenByElement = new WeakMap();\n }\n get started() {\n return this.tokenListObserver.started;\n }\n start() {\n this.tokenListObserver.start();\n }\n stop() {\n this.tokenListObserver.stop();\n }\n refresh() {\n this.tokenListObserver.refresh();\n }\n get element() {\n return this.tokenListObserver.element;\n }\n get attributeName() {\n return this.tokenListObserver.attributeName;\n }\n tokenMatched(token) {\n const { element: element } = token;\n const { value: value } = this.fetchParseResultForToken(token);\n if (value) {\n this.fetchValuesByTokenForElement(element).set(token, value);\n this.delegate.elementMatchedValue(element, value);\n }\n }\n tokenUnmatched(token) {\n const { element: element } = token;\n const { value: value } = this.fetchParseResultForToken(token);\n if (value) {\n this.fetchValuesByTokenForElement(element).delete(token);\n this.delegate.elementUnmatchedValue(element, value);\n }\n }\n fetchParseResultForToken(token) {\n let parseResult = this.parseResultsByToken.get(token);\n if (!parseResult) {\n parseResult = this.parseToken(token);\n this.parseResultsByToken.set(token, parseResult);\n }\n return parseResult;\n }\n fetchValuesByTokenForElement(element) {\n let valuesByToken = this.valuesByTokenByElement.get(element);\n if (!valuesByToken) {\n valuesByToken = new Map();\n this.valuesByTokenByElement.set(element, valuesByToken);\n }\n return valuesByToken;\n }\n parseToken(token) {\n try {\n const value = this.delegate.parseValueForToken(token);\n return {\n value: value\n };\n } catch (error) {\n return {\n error: error\n };\n }\n }\n}\nclass $27d274cf1203127c$var$BindingObserver {\n constructor(context, delegate){\n this.context = context;\n this.delegate = delegate;\n this.bindingsByAction = new Map();\n }\n start() {\n if (!this.valueListObserver) {\n this.valueListObserver = new $27d274cf1203127c$export$d27fa4c7330a452e(this.element, this.actionAttribute, this);\n this.valueListObserver.start();\n }\n }\n stop() {\n if (this.valueListObserver) {\n this.valueListObserver.stop();\n delete this.valueListObserver;\n this.disconnectAllActions();\n }\n }\n get element() {\n return this.context.element;\n }\n get identifier() {\n return this.context.identifier;\n }\n get actionAttribute() {\n return this.schema.actionAttribute;\n }\n get schema() {\n return this.context.schema;\n }\n get bindings() {\n return Array.from(this.bindingsByAction.values());\n }\n connectAction(action) {\n const binding = new $27d274cf1203127c$var$Binding(this.context, action);\n this.bindingsByAction.set(action, binding);\n this.delegate.bindingConnected(binding);\n }\n disconnectAction(action) {\n const binding = this.bindingsByAction.get(action);\n if (binding) {\n this.bindingsByAction.delete(action);\n this.delegate.bindingDisconnected(binding);\n }\n }\n disconnectAllActions() {\n this.bindings.forEach((binding)=>this.delegate.bindingDisconnected(binding, true));\n this.bindingsByAction.clear();\n }\n parseValueForToken(token) {\n const action = $27d274cf1203127c$var$Action.forToken(token, this.schema);\n if (action.identifier == this.identifier) return action;\n }\n elementMatchedValue(element, action) {\n this.connectAction(action);\n }\n elementUnmatchedValue(element, action) {\n this.disconnectAction(action);\n }\n}\nclass $27d274cf1203127c$var$ValueObserver {\n constructor(context, receiver){\n this.context = context;\n this.receiver = receiver;\n this.stringMapObserver = new $27d274cf1203127c$export$da226bebbf7f6caa(this.element, this);\n this.valueDescriptorMap = this.controller.valueDescriptorMap;\n }\n start() {\n this.stringMapObserver.start();\n this.invokeChangedCallbacksForDefaultValues();\n }\n stop() {\n this.stringMapObserver.stop();\n }\n get element() {\n return this.context.element;\n }\n get controller() {\n return this.context.controller;\n }\n getStringMapKeyForAttribute(attributeName) {\n if (attributeName in this.valueDescriptorMap) return this.valueDescriptorMap[attributeName].name;\n }\n stringMapKeyAdded(key, attributeName) {\n const descriptor = this.valueDescriptorMap[attributeName];\n if (!this.hasValue(key)) this.invokeChangedCallback(key, descriptor.writer(this.receiver[key]), descriptor.writer(descriptor.defaultValue));\n }\n stringMapValueChanged(value, name, oldValue) {\n const descriptor = this.valueDescriptorNameMap[name];\n if (value === null) return;\n if (oldValue === null) oldValue = descriptor.writer(descriptor.defaultValue);\n this.invokeChangedCallback(name, value, oldValue);\n }\n stringMapKeyRemoved(key, attributeName, oldValue) {\n const descriptor = this.valueDescriptorNameMap[key];\n if (this.hasValue(key)) this.invokeChangedCallback(key, descriptor.writer(this.receiver[key]), oldValue);\n else this.invokeChangedCallback(key, descriptor.writer(descriptor.defaultValue), oldValue);\n }\n invokeChangedCallbacksForDefaultValues() {\n for (const { key: key, name: name, defaultValue: defaultValue, writer: writer } of this.valueDescriptors)if (defaultValue != undefined && !this.controller.data.has(key)) this.invokeChangedCallback(name, writer(defaultValue), undefined);\n }\n invokeChangedCallback(name, rawValue, rawOldValue) {\n const changedMethodName = `${name}Changed`;\n const changedMethod = this.receiver[changedMethodName];\n if (typeof changedMethod == \"function\") {\n const descriptor = this.valueDescriptorNameMap[name];\n try {\n const value = descriptor.reader(rawValue);\n let oldValue = rawOldValue;\n if (rawOldValue) oldValue = descriptor.reader(rawOldValue);\n changedMethod.call(this.receiver, value, oldValue);\n } catch (error) {\n if (error instanceof TypeError) error.message = `Stimulus Value \"${this.context.identifier}.${descriptor.name}\" - ${error.message}`;\n throw error;\n }\n }\n }\n get valueDescriptors() {\n const { valueDescriptorMap: valueDescriptorMap } = this;\n return Object.keys(valueDescriptorMap).map((key)=>valueDescriptorMap[key]);\n }\n get valueDescriptorNameMap() {\n const descriptors = {};\n Object.keys(this.valueDescriptorMap).forEach((key)=>{\n const descriptor = this.valueDescriptorMap[key];\n descriptors[descriptor.name] = descriptor;\n });\n return descriptors;\n }\n hasValue(attributeName) {\n const descriptor = this.valueDescriptorNameMap[attributeName];\n const hasMethodName = `has${$27d274cf1203127c$var$capitalize(descriptor.name)}`;\n return this.receiver[hasMethodName];\n }\n}\nclass $27d274cf1203127c$var$TargetObserver {\n constructor(context, delegate){\n this.context = context;\n this.delegate = delegate;\n this.targetsByName = new $27d274cf1203127c$export$8bd4ad37b76db6ba();\n }\n start() {\n if (!this.tokenListObserver) {\n this.tokenListObserver = new $27d274cf1203127c$export$3aa21c2f03ef6b3b(this.element, this.attributeName, this);\n this.tokenListObserver.start();\n }\n }\n stop() {\n if (this.tokenListObserver) {\n this.disconnectAllTargets();\n this.tokenListObserver.stop();\n delete this.tokenListObserver;\n }\n }\n tokenMatched({ element: element, content: name }) {\n if (this.scope.containsElement(element)) this.connectTarget(element, name);\n }\n tokenUnmatched({ element: element, content: name }) {\n this.disconnectTarget(element, name);\n }\n connectTarget(element, name) {\n var _a;\n if (!this.targetsByName.has(name, element)) {\n this.targetsByName.add(name, element);\n (_a = this.tokenListObserver) === null || _a === void 0 || _a.pause(()=>this.delegate.targetConnected(element, name));\n }\n }\n disconnectTarget(element, name) {\n var _a;\n if (this.targetsByName.has(name, element)) {\n this.targetsByName.delete(name, element);\n (_a = this.tokenListObserver) === null || _a === void 0 || _a.pause(()=>this.delegate.targetDisconnected(element, name));\n }\n }\n disconnectAllTargets() {\n for (const name of this.targetsByName.keys)for (const element of this.targetsByName.getValuesForKey(name))this.disconnectTarget(element, name);\n }\n get attributeName() {\n return `data-${this.context.identifier}-target`;\n }\n get element() {\n return this.context.element;\n }\n get scope() {\n return this.context.scope;\n }\n}\nfunction $27d274cf1203127c$var$readInheritableStaticArrayValues(constructor, propertyName) {\n const ancestors = $27d274cf1203127c$var$getAncestorsForConstructor(constructor);\n return Array.from(ancestors.reduce((values, constructor)=>{\n $27d274cf1203127c$var$getOwnStaticArrayValues(constructor, propertyName).forEach((name)=>values.add(name));\n return values;\n }, new Set()));\n}\nfunction $27d274cf1203127c$var$readInheritableStaticObjectPairs(constructor, propertyName) {\n const ancestors = $27d274cf1203127c$var$getAncestorsForConstructor(constructor);\n return ancestors.reduce((pairs, constructor)=>{\n pairs.push(...$27d274cf1203127c$var$getOwnStaticObjectPairs(constructor, propertyName));\n return pairs;\n }, []);\n}\nfunction $27d274cf1203127c$var$getAncestorsForConstructor(constructor) {\n const ancestors = [];\n while(constructor){\n ancestors.push(constructor);\n constructor = Object.getPrototypeOf(constructor);\n }\n return ancestors.reverse();\n}\nfunction $27d274cf1203127c$var$getOwnStaticArrayValues(constructor, propertyName) {\n const definition = constructor[propertyName];\n return Array.isArray(definition) ? definition : [];\n}\nfunction $27d274cf1203127c$var$getOwnStaticObjectPairs(constructor, propertyName) {\n const definition = constructor[propertyName];\n return definition ? Object.keys(definition).map((key)=>[\n key,\n definition[key]\n ]) : [];\n}\nclass $27d274cf1203127c$var$OutletObserver {\n constructor(context, delegate){\n this.started = false;\n this.context = context;\n this.delegate = delegate;\n this.outletsByName = new $27d274cf1203127c$export$8bd4ad37b76db6ba();\n this.outletElementsByName = new $27d274cf1203127c$export$8bd4ad37b76db6ba();\n this.selectorObserverMap = new Map();\n this.attributeObserverMap = new Map();\n }\n start() {\n if (!this.started) {\n this.outletDefinitions.forEach((outletName)=>{\n this.setupSelectorObserverForOutlet(outletName);\n this.setupAttributeObserverForOutlet(outletName);\n });\n this.started = true;\n this.dependentContexts.forEach((context)=>context.refresh());\n }\n }\n refresh() {\n this.selectorObserverMap.forEach((observer)=>observer.refresh());\n this.attributeObserverMap.forEach((observer)=>observer.refresh());\n }\n stop() {\n if (this.started) {\n this.started = false;\n this.disconnectAllOutlets();\n this.stopSelectorObservers();\n this.stopAttributeObservers();\n }\n }\n stopSelectorObservers() {\n if (this.selectorObserverMap.size > 0) {\n this.selectorObserverMap.forEach((observer)=>observer.stop());\n this.selectorObserverMap.clear();\n }\n }\n stopAttributeObservers() {\n if (this.attributeObserverMap.size > 0) {\n this.attributeObserverMap.forEach((observer)=>observer.stop());\n this.attributeObserverMap.clear();\n }\n }\n selectorMatched(element, _selector, { outletName: outletName }) {\n const outlet = this.getOutlet(element, outletName);\n if (outlet) this.connectOutlet(outlet, element, outletName);\n }\n selectorUnmatched(element, _selector, { outletName: outletName }) {\n const outlet = this.getOutletFromMap(element, outletName);\n if (outlet) this.disconnectOutlet(outlet, element, outletName);\n }\n selectorMatchElement(element, { outletName: outletName }) {\n const selector = this.selector(outletName);\n const hasOutlet = this.hasOutlet(element, outletName);\n const hasOutletController = element.matches(`[${this.schema.controllerAttribute}~=${outletName}]`);\n if (selector) return hasOutlet && hasOutletController && element.matches(selector);\n else return false;\n }\n elementMatchedAttribute(_element, attributeName) {\n const outletName = this.getOutletNameFromOutletAttributeName(attributeName);\n if (outletName) this.updateSelectorObserverForOutlet(outletName);\n }\n elementAttributeValueChanged(_element, attributeName) {\n const outletName = this.getOutletNameFromOutletAttributeName(attributeName);\n if (outletName) this.updateSelectorObserverForOutlet(outletName);\n }\n elementUnmatchedAttribute(_element, attributeName) {\n const outletName = this.getOutletNameFromOutletAttributeName(attributeName);\n if (outletName) this.updateSelectorObserverForOutlet(outletName);\n }\n connectOutlet(outlet, element, outletName) {\n var _a;\n if (!this.outletElementsByName.has(outletName, element)) {\n this.outletsByName.add(outletName, outlet);\n this.outletElementsByName.add(outletName, element);\n (_a = this.selectorObserverMap.get(outletName)) === null || _a === void 0 || _a.pause(()=>this.delegate.outletConnected(outlet, element, outletName));\n }\n }\n disconnectOutlet(outlet, element, outletName) {\n var _a;\n if (this.outletElementsByName.has(outletName, element)) {\n this.outletsByName.delete(outletName, outlet);\n this.outletElementsByName.delete(outletName, element);\n (_a = this.selectorObserverMap.get(outletName)) === null || _a === void 0 || _a.pause(()=>this.delegate.outletDisconnected(outlet, element, outletName));\n }\n }\n disconnectAllOutlets() {\n for (const outletName of this.outletElementsByName.keys){\n for (const element of this.outletElementsByName.getValuesForKey(outletName))for (const outlet of this.outletsByName.getValuesForKey(outletName))this.disconnectOutlet(outlet, element, outletName);\n }\n }\n updateSelectorObserverForOutlet(outletName) {\n const observer = this.selectorObserverMap.get(outletName);\n if (observer) observer.selector = this.selector(outletName);\n }\n setupSelectorObserverForOutlet(outletName) {\n const selector = this.selector(outletName);\n const selectorObserver = new $27d274cf1203127c$export$116e0b48509995b(document.body, selector, this, {\n outletName: outletName\n });\n this.selectorObserverMap.set(outletName, selectorObserver);\n selectorObserver.start();\n }\n setupAttributeObserverForOutlet(outletName) {\n const attributeName = this.attributeNameForOutletName(outletName);\n const attributeObserver = new $27d274cf1203127c$export$fe68319d413d05cb(this.scope.element, attributeName, this);\n this.attributeObserverMap.set(outletName, attributeObserver);\n attributeObserver.start();\n }\n selector(outletName) {\n return this.scope.outlets.getSelectorForOutletName(outletName);\n }\n attributeNameForOutletName(outletName) {\n return this.scope.schema.outletAttributeForScope(this.identifier, outletName);\n }\n getOutletNameFromOutletAttributeName(attributeName) {\n return this.outletDefinitions.find((outletName)=>this.attributeNameForOutletName(outletName) === attributeName);\n }\n get outletDependencies() {\n const dependencies = new $27d274cf1203127c$export$8bd4ad37b76db6ba();\n this.router.modules.forEach((module)=>{\n const constructor = module.definition.controllerConstructor;\n const outlets = $27d274cf1203127c$var$readInheritableStaticArrayValues(constructor, \"outlets\");\n outlets.forEach((outlet)=>dependencies.add(outlet, module.identifier));\n });\n return dependencies;\n }\n get outletDefinitions() {\n return this.outletDependencies.getKeysForValue(this.identifier);\n }\n get dependentControllerIdentifiers() {\n return this.outletDependencies.getValuesForKey(this.identifier);\n }\n get dependentContexts() {\n const identifiers = this.dependentControllerIdentifiers;\n return this.router.contexts.filter((context)=>identifiers.includes(context.identifier));\n }\n hasOutlet(element, outletName) {\n return !!this.getOutlet(element, outletName) || !!this.getOutletFromMap(element, outletName);\n }\n getOutlet(element, outletName) {\n return this.application.getControllerForElementAndIdentifier(element, outletName);\n }\n getOutletFromMap(element, outletName) {\n return this.outletsByName.getValuesForKey(outletName).find((outlet)=>outlet.element === element);\n }\n get scope() {\n return this.context.scope;\n }\n get schema() {\n return this.context.schema;\n }\n get identifier() {\n return this.context.identifier;\n }\n get application() {\n return this.context.application;\n }\n get router() {\n return this.application.router;\n }\n}\nclass $27d274cf1203127c$export$841858b892ce1f4c {\n constructor(module, scope){\n this.logDebugActivity = (functionName, detail = {})=>{\n const { identifier: identifier, controller: controller, element: element } = this;\n detail = Object.assign({\n identifier: identifier,\n controller: controller,\n element: element\n }, detail);\n this.application.logDebugActivity(this.identifier, functionName, detail);\n };\n this.module = module;\n this.scope = scope;\n this.controller = new module.controllerConstructor(this);\n this.bindingObserver = new $27d274cf1203127c$var$BindingObserver(this, this.dispatcher);\n this.valueObserver = new $27d274cf1203127c$var$ValueObserver(this, this.controller);\n this.targetObserver = new $27d274cf1203127c$var$TargetObserver(this, this);\n this.outletObserver = new $27d274cf1203127c$var$OutletObserver(this, this);\n try {\n this.controller.initialize();\n this.logDebugActivity(\"initialize\");\n } catch (error) {\n this.handleError(error, \"initializing controller\");\n }\n }\n connect() {\n this.bindingObserver.start();\n this.valueObserver.start();\n this.targetObserver.start();\n this.outletObserver.start();\n try {\n this.controller.connect();\n this.logDebugActivity(\"connect\");\n } catch (error) {\n this.handleError(error, \"connecting controller\");\n }\n }\n refresh() {\n this.outletObserver.refresh();\n }\n disconnect() {\n try {\n this.controller.disconnect();\n this.logDebugActivity(\"disconnect\");\n } catch (error) {\n this.handleError(error, \"disconnecting controller\");\n }\n this.outletObserver.stop();\n this.targetObserver.stop();\n this.valueObserver.stop();\n this.bindingObserver.stop();\n }\n get application() {\n return this.module.application;\n }\n get identifier() {\n return this.module.identifier;\n }\n get schema() {\n return this.application.schema;\n }\n get dispatcher() {\n return this.application.dispatcher;\n }\n get element() {\n return this.scope.element;\n }\n get parentElement() {\n return this.element.parentElement;\n }\n handleError(error, message, detail = {}) {\n const { identifier: identifier, controller: controller, element: element } = this;\n detail = Object.assign({\n identifier: identifier,\n controller: controller,\n element: element\n }, detail);\n this.application.handleError(error, `Error ${message}`, detail);\n }\n targetConnected(element, name) {\n this.invokeControllerMethod(`${name}TargetConnected`, element);\n }\n targetDisconnected(element, name) {\n this.invokeControllerMethod(`${name}TargetDisconnected`, element);\n }\n outletConnected(outlet, element, name) {\n this.invokeControllerMethod(`${$27d274cf1203127c$var$namespaceCamelize(name)}OutletConnected`, outlet, element);\n }\n outletDisconnected(outlet, element, name) {\n this.invokeControllerMethod(`${$27d274cf1203127c$var$namespaceCamelize(name)}OutletDisconnected`, outlet, element);\n }\n invokeControllerMethod(methodName, ...args) {\n const controller = this.controller;\n if (typeof controller[methodName] == \"function\") controller[methodName](...args);\n }\n}\nfunction $27d274cf1203127c$var$bless(constructor) {\n return $27d274cf1203127c$var$shadow(constructor, $27d274cf1203127c$var$getBlessedProperties(constructor));\n}\nfunction $27d274cf1203127c$var$shadow(constructor, properties) {\n const shadowConstructor = $27d274cf1203127c$var$extend(constructor);\n const shadowProperties = $27d274cf1203127c$var$getShadowProperties(constructor.prototype, properties);\n Object.defineProperties(shadowConstructor.prototype, shadowProperties);\n return shadowConstructor;\n}\nfunction $27d274cf1203127c$var$getBlessedProperties(constructor) {\n const blessings = $27d274cf1203127c$var$readInheritableStaticArrayValues(constructor, \"blessings\");\n return blessings.reduce((blessedProperties, blessing)=>{\n const properties = blessing(constructor);\n for(const key in properties){\n const descriptor = blessedProperties[key] || {};\n blessedProperties[key] = Object.assign(descriptor, properties[key]);\n }\n return blessedProperties;\n }, {});\n}\nfunction $27d274cf1203127c$var$getShadowProperties(prototype, properties) {\n return $27d274cf1203127c$var$getOwnKeys(properties).reduce((shadowProperties, key)=>{\n const descriptor = $27d274cf1203127c$var$getShadowedDescriptor(prototype, properties, key);\n if (descriptor) Object.assign(shadowProperties, {\n [key]: descriptor\n });\n return shadowProperties;\n }, {});\n}\nfunction $27d274cf1203127c$var$getShadowedDescriptor(prototype, properties, key) {\n const shadowingDescriptor = Object.getOwnPropertyDescriptor(prototype, key);\n const shadowedByValue = shadowingDescriptor && \"value\" in shadowingDescriptor;\n if (!shadowedByValue) {\n const descriptor = Object.getOwnPropertyDescriptor(properties, key).value;\n if (shadowingDescriptor) {\n descriptor.get = shadowingDescriptor.get || descriptor.get;\n descriptor.set = shadowingDescriptor.set || descriptor.set;\n }\n return descriptor;\n }\n}\nconst $27d274cf1203127c$var$getOwnKeys = (()=>{\n if (typeof Object.getOwnPropertySymbols == \"function\") return (object)=>[\n ...Object.getOwnPropertyNames(object),\n ...Object.getOwnPropertySymbols(object)\n ];\n else return Object.getOwnPropertyNames;\n})();\nconst $27d274cf1203127c$var$extend = (()=>{\n function extendWithReflect(constructor) {\n function extended() {\n return Reflect.construct(constructor, arguments, new.target);\n }\n extended.prototype = Object.create(constructor.prototype, {\n constructor: {\n value: extended\n }\n });\n Reflect.setPrototypeOf(extended, constructor);\n return extended;\n }\n function testReflectExtension() {\n const a = function() {\n this.a.call(this);\n };\n const b = extendWithReflect(a);\n b.prototype.a = function() {};\n return new b();\n }\n try {\n testReflectExtension();\n return extendWithReflect;\n } catch (error) {\n return (constructor)=>class extended extends constructor {\n };\n }\n})();\nfunction $27d274cf1203127c$var$blessDefinition(definition) {\n return {\n identifier: definition.identifier,\n controllerConstructor: $27d274cf1203127c$var$bless(definition.controllerConstructor)\n };\n}\nclass $27d274cf1203127c$var$Module {\n constructor(application, definition){\n this.application = application;\n this.definition = $27d274cf1203127c$var$blessDefinition(definition);\n this.contextsByScope = new WeakMap();\n this.connectedContexts = new Set();\n }\n get identifier() {\n return this.definition.identifier;\n }\n get controllerConstructor() {\n return this.definition.controllerConstructor;\n }\n get contexts() {\n return Array.from(this.connectedContexts);\n }\n connectContextForScope(scope) {\n const context = this.fetchContextForScope(scope);\n this.connectedContexts.add(context);\n context.connect();\n }\n disconnectContextForScope(scope) {\n const context = this.contextsByScope.get(scope);\n if (context) {\n this.connectedContexts.delete(context);\n context.disconnect();\n }\n }\n fetchContextForScope(scope) {\n let context = this.contextsByScope.get(scope);\n if (!context) {\n context = new $27d274cf1203127c$export$841858b892ce1f4c(this, scope);\n this.contextsByScope.set(scope, context);\n }\n return context;\n }\n}\nclass $27d274cf1203127c$var$ClassMap {\n constructor(scope){\n this.scope = scope;\n }\n has(name) {\n return this.data.has(this.getDataKey(name));\n }\n get(name) {\n return this.getAll(name)[0];\n }\n getAll(name) {\n const tokenString = this.data.get(this.getDataKey(name)) || \"\";\n return $27d274cf1203127c$var$tokenize(tokenString);\n }\n getAttributeName(name) {\n return this.data.getAttributeNameForKey(this.getDataKey(name));\n }\n getDataKey(name) {\n return `${name}-class`;\n }\n get data() {\n return this.scope.data;\n }\n}\nclass $27d274cf1203127c$var$DataMap {\n constructor(scope){\n this.scope = scope;\n }\n get element() {\n return this.scope.element;\n }\n get identifier() {\n return this.scope.identifier;\n }\n get(key) {\n const name = this.getAttributeNameForKey(key);\n return this.element.getAttribute(name);\n }\n set(key, value) {\n const name = this.getAttributeNameForKey(key);\n this.element.setAttribute(name, value);\n return this.get(key);\n }\n has(key) {\n const name = this.getAttributeNameForKey(key);\n return this.element.hasAttribute(name);\n }\n delete(key) {\n if (this.has(key)) {\n const name = this.getAttributeNameForKey(key);\n this.element.removeAttribute(name);\n return true;\n } else return false;\n }\n getAttributeNameForKey(key) {\n return `data-${this.identifier}-${$27d274cf1203127c$var$dasherize(key)}`;\n }\n}\nclass $27d274cf1203127c$var$Guide {\n constructor(logger){\n this.warnedKeysByObject = new WeakMap();\n this.logger = logger;\n }\n warn(object, key, message) {\n let warnedKeys = this.warnedKeysByObject.get(object);\n if (!warnedKeys) {\n warnedKeys = new Set();\n this.warnedKeysByObject.set(object, warnedKeys);\n }\n if (!warnedKeys.has(key)) {\n warnedKeys.add(key);\n this.logger.warn(message, object);\n }\n }\n}\nfunction $27d274cf1203127c$var$attributeValueContainsToken(attributeName, token) {\n return `[${attributeName}~=\"${token}\"]`;\n}\nclass $27d274cf1203127c$var$TargetSet {\n constructor(scope){\n this.scope = scope;\n }\n get element() {\n return this.scope.element;\n }\n get identifier() {\n return this.scope.identifier;\n }\n get schema() {\n return this.scope.schema;\n }\n has(targetName) {\n return this.find(targetName) != null;\n }\n find(...targetNames) {\n return targetNames.reduce((target, targetName)=>target || this.findTarget(targetName) || this.findLegacyTarget(targetName), undefined);\n }\n findAll(...targetNames) {\n return targetNames.reduce((targets, targetName)=>[\n ...targets,\n ...this.findAllTargets(targetName),\n ...this.findAllLegacyTargets(targetName)\n ], []);\n }\n findTarget(targetName) {\n const selector = this.getSelectorForTargetName(targetName);\n return this.scope.findElement(selector);\n }\n findAllTargets(targetName) {\n const selector = this.getSelectorForTargetName(targetName);\n return this.scope.findAllElements(selector);\n }\n getSelectorForTargetName(targetName) {\n const attributeName = this.schema.targetAttributeForScope(this.identifier);\n return $27d274cf1203127c$var$attributeValueContainsToken(attributeName, targetName);\n }\n findLegacyTarget(targetName) {\n const selector = this.getLegacySelectorForTargetName(targetName);\n return this.deprecate(this.scope.findElement(selector), targetName);\n }\n findAllLegacyTargets(targetName) {\n const selector = this.getLegacySelectorForTargetName(targetName);\n return this.scope.findAllElements(selector).map((element)=>this.deprecate(element, targetName));\n }\n getLegacySelectorForTargetName(targetName) {\n const targetDescriptor = `${this.identifier}.${targetName}`;\n return $27d274cf1203127c$var$attributeValueContainsToken(this.schema.targetAttribute, targetDescriptor);\n }\n deprecate(element, targetName) {\n if (element) {\n const { identifier: identifier } = this;\n const attributeName = this.schema.targetAttribute;\n const revisedAttributeName = this.schema.targetAttributeForScope(identifier);\n this.guide.warn(element, `target:${targetName}`, `Please replace ${attributeName}=\"${identifier}.${targetName}\" with ${revisedAttributeName}=\"${targetName}\". ` + `The ${attributeName} attribute is deprecated and will be removed in a future version of Stimulus.`);\n }\n return element;\n }\n get guide() {\n return this.scope.guide;\n }\n}\nclass $27d274cf1203127c$var$OutletSet {\n constructor(scope, controllerElement){\n this.scope = scope;\n this.controllerElement = controllerElement;\n }\n get element() {\n return this.scope.element;\n }\n get identifier() {\n return this.scope.identifier;\n }\n get schema() {\n return this.scope.schema;\n }\n has(outletName) {\n return this.find(outletName) != null;\n }\n find(...outletNames) {\n return outletNames.reduce((outlet, outletName)=>outlet || this.findOutlet(outletName), undefined);\n }\n findAll(...outletNames) {\n return outletNames.reduce((outlets, outletName)=>[\n ...outlets,\n ...this.findAllOutlets(outletName)\n ], []);\n }\n getSelectorForOutletName(outletName) {\n const attributeName = this.schema.outletAttributeForScope(this.identifier, outletName);\n return this.controllerElement.getAttribute(attributeName);\n }\n findOutlet(outletName) {\n const selector = this.getSelectorForOutletName(outletName);\n if (selector) return this.findElement(selector, outletName);\n }\n findAllOutlets(outletName) {\n const selector = this.getSelectorForOutletName(outletName);\n return selector ? this.findAllElements(selector, outletName) : [];\n }\n findElement(selector, outletName) {\n const elements = this.scope.queryElements(selector);\n return elements.filter((element)=>this.matchesElement(element, selector, outletName))[0];\n }\n findAllElements(selector, outletName) {\n const elements = this.scope.queryElements(selector);\n return elements.filter((element)=>this.matchesElement(element, selector, outletName));\n }\n matchesElement(element, selector, outletName) {\n const controllerAttribute = element.getAttribute(this.scope.schema.controllerAttribute) || \"\";\n return element.matches(selector) && controllerAttribute.split(\" \").includes(outletName);\n }\n}\nclass $27d274cf1203127c$var$Scope {\n constructor(schema, element, identifier, logger){\n this.targets = new $27d274cf1203127c$var$TargetSet(this);\n this.classes = new $27d274cf1203127c$var$ClassMap(this);\n this.data = new $27d274cf1203127c$var$DataMap(this);\n this.containsElement = (element)=>{\n return element.closest(this.controllerSelector) === this.element;\n };\n this.schema = schema;\n this.element = element;\n this.identifier = identifier;\n this.guide = new $27d274cf1203127c$var$Guide(logger);\n this.outlets = new $27d274cf1203127c$var$OutletSet(this.documentScope, element);\n }\n findElement(selector) {\n return this.element.matches(selector) ? this.element : this.queryElements(selector).find(this.containsElement);\n }\n findAllElements(selector) {\n return [\n ...this.element.matches(selector) ? [\n this.element\n ] : [],\n ...this.queryElements(selector).filter(this.containsElement)\n ];\n }\n queryElements(selector) {\n return Array.from(this.element.querySelectorAll(selector));\n }\n get controllerSelector() {\n return $27d274cf1203127c$var$attributeValueContainsToken(this.schema.controllerAttribute, this.identifier);\n }\n get isDocumentScope() {\n return this.element === document.documentElement;\n }\n get documentScope() {\n return this.isDocumentScope ? this : new $27d274cf1203127c$var$Scope(this.schema, document.documentElement, this.identifier, this.guide.logger);\n }\n}\nclass $27d274cf1203127c$var$ScopeObserver {\n constructor(element, schema, delegate){\n this.element = element;\n this.schema = schema;\n this.delegate = delegate;\n this.valueListObserver = new $27d274cf1203127c$export$d27fa4c7330a452e(this.element, this.controllerAttribute, this);\n this.scopesByIdentifierByElement = new WeakMap();\n this.scopeReferenceCounts = new WeakMap();\n }\n start() {\n this.valueListObserver.start();\n }\n stop() {\n this.valueListObserver.stop();\n }\n get controllerAttribute() {\n return this.schema.controllerAttribute;\n }\n parseValueForToken(token) {\n const { element: element, content: identifier } = token;\n return this.parseValueForElementAndIdentifier(element, identifier);\n }\n parseValueForElementAndIdentifier(element, identifier) {\n const scopesByIdentifier = this.fetchScopesByIdentifierForElement(element);\n let scope = scopesByIdentifier.get(identifier);\n if (!scope) {\n scope = this.delegate.createScopeForElementAndIdentifier(element, identifier);\n scopesByIdentifier.set(identifier, scope);\n }\n return scope;\n }\n elementMatchedValue(element, value) {\n const referenceCount = (this.scopeReferenceCounts.get(value) || 0) + 1;\n this.scopeReferenceCounts.set(value, referenceCount);\n if (referenceCount == 1) this.delegate.scopeConnected(value);\n }\n elementUnmatchedValue(element, value) {\n const referenceCount = this.scopeReferenceCounts.get(value);\n if (referenceCount) {\n this.scopeReferenceCounts.set(value, referenceCount - 1);\n if (referenceCount == 1) this.delegate.scopeDisconnected(value);\n }\n }\n fetchScopesByIdentifierForElement(element) {\n let scopesByIdentifier = this.scopesByIdentifierByElement.get(element);\n if (!scopesByIdentifier) {\n scopesByIdentifier = new Map();\n this.scopesByIdentifierByElement.set(element, scopesByIdentifier);\n }\n return scopesByIdentifier;\n }\n}\nclass $27d274cf1203127c$var$Router {\n constructor(application){\n this.application = application;\n this.scopeObserver = new $27d274cf1203127c$var$ScopeObserver(this.element, this.schema, this);\n this.scopesByIdentifier = new $27d274cf1203127c$export$8bd4ad37b76db6ba();\n this.modulesByIdentifier = new Map();\n }\n get element() {\n return this.application.element;\n }\n get schema() {\n return this.application.schema;\n }\n get logger() {\n return this.application.logger;\n }\n get controllerAttribute() {\n return this.schema.controllerAttribute;\n }\n get modules() {\n return Array.from(this.modulesByIdentifier.values());\n }\n get contexts() {\n return this.modules.reduce((contexts, module)=>contexts.concat(module.contexts), []);\n }\n start() {\n this.scopeObserver.start();\n }\n stop() {\n this.scopeObserver.stop();\n }\n loadDefinition(definition) {\n this.unloadIdentifier(definition.identifier);\n const module = new $27d274cf1203127c$var$Module(this.application, definition);\n this.connectModule(module);\n const afterLoad = definition.controllerConstructor.afterLoad;\n if (afterLoad) afterLoad.call(definition.controllerConstructor, definition.identifier, this.application);\n }\n unloadIdentifier(identifier) {\n const module = this.modulesByIdentifier.get(identifier);\n if (module) this.disconnectModule(module);\n }\n getContextForElementAndIdentifier(element, identifier) {\n const module = this.modulesByIdentifier.get(identifier);\n if (module) return module.contexts.find((context)=>context.element == element);\n }\n proposeToConnectScopeForElementAndIdentifier(element, identifier) {\n const scope = this.scopeObserver.parseValueForElementAndIdentifier(element, identifier);\n if (scope) this.scopeObserver.elementMatchedValue(scope.element, scope);\n else console.error(`Couldn't find or create scope for identifier: \"${identifier}\" and element:`, element);\n }\n handleError(error, message, detail) {\n this.application.handleError(error, message, detail);\n }\n createScopeForElementAndIdentifier(element, identifier) {\n return new $27d274cf1203127c$var$Scope(this.schema, element, identifier, this.logger);\n }\n scopeConnected(scope) {\n this.scopesByIdentifier.add(scope.identifier, scope);\n const module = this.modulesByIdentifier.get(scope.identifier);\n if (module) module.connectContextForScope(scope);\n }\n scopeDisconnected(scope) {\n this.scopesByIdentifier.delete(scope.identifier, scope);\n const module = this.modulesByIdentifier.get(scope.identifier);\n if (module) module.disconnectContextForScope(scope);\n }\n connectModule(module) {\n this.modulesByIdentifier.set(module.identifier, module);\n const scopes = this.scopesByIdentifier.getValuesForKey(module.identifier);\n scopes.forEach((scope)=>module.connectContextForScope(scope));\n }\n disconnectModule(module) {\n this.modulesByIdentifier.delete(module.identifier);\n const scopes = this.scopesByIdentifier.getValuesForKey(module.identifier);\n scopes.forEach((scope)=>module.disconnectContextForScope(scope));\n }\n}\nconst $27d274cf1203127c$export$1db618b7b2275ea1 = {\n controllerAttribute: \"data-controller\",\n actionAttribute: \"data-action\",\n targetAttribute: \"data-target\",\n targetAttributeForScope: (identifier)=>`data-${identifier}-target`,\n outletAttributeForScope: (identifier, outlet)=>`data-${identifier}-${outlet}-outlet`,\n keyMappings: Object.assign(Object.assign({\n enter: \"Enter\",\n tab: \"Tab\",\n esc: \"Escape\",\n space: \" \",\n up: \"ArrowUp\",\n down: \"ArrowDown\",\n left: \"ArrowLeft\",\n right: \"ArrowRight\",\n home: \"Home\",\n end: \"End\",\n page_up: \"PageUp\",\n page_down: \"PageDown\"\n }, $27d274cf1203127c$var$objectFromEntries(\"abcdefghijklmnopqrstuvwxyz\".split(\"\").map((c)=>[\n c,\n c\n ]))), $27d274cf1203127c$var$objectFromEntries(\"0123456789\".split(\"\").map((n)=>[\n n,\n n\n ])))\n};\nfunction $27d274cf1203127c$var$objectFromEntries(array) {\n return array.reduce((memo, [k, v])=>Object.assign(Object.assign({}, memo), {\n [k]: v\n }), {});\n}\nclass $27d274cf1203127c$export$16975c34e60e1e61 {\n constructor(element = document.documentElement, schema = $27d274cf1203127c$export$1db618b7b2275ea1){\n this.logger = console;\n this.debug = false;\n this.logDebugActivity = (identifier, functionName, detail = {})=>{\n if (this.debug) this.logFormattedMessage(identifier, functionName, detail);\n };\n this.element = element;\n this.schema = schema;\n this.dispatcher = new $27d274cf1203127c$var$Dispatcher(this);\n this.router = new $27d274cf1203127c$var$Router(this);\n this.actionDescriptorFilters = Object.assign({}, $27d274cf1203127c$var$defaultActionDescriptorFilters);\n }\n static start(element, schema) {\n const application = new this(element, schema);\n application.start();\n return application;\n }\n async start() {\n await $27d274cf1203127c$var$domReady();\n this.logDebugActivity(\"application\", \"starting\");\n this.dispatcher.start();\n this.router.start();\n this.logDebugActivity(\"application\", \"start\");\n }\n stop() {\n this.logDebugActivity(\"application\", \"stopping\");\n this.dispatcher.stop();\n this.router.stop();\n this.logDebugActivity(\"application\", \"stop\");\n }\n register(identifier, controllerConstructor) {\n this.load({\n identifier: identifier,\n controllerConstructor: controllerConstructor\n });\n }\n registerActionOption(name, filter) {\n this.actionDescriptorFilters[name] = filter;\n }\n load(head, ...rest) {\n const definitions = Array.isArray(head) ? head : [\n head,\n ...rest\n ];\n definitions.forEach((definition)=>{\n if (definition.controllerConstructor.shouldLoad) this.router.loadDefinition(definition);\n });\n }\n unload(head, ...rest) {\n const identifiers = Array.isArray(head) ? head : [\n head,\n ...rest\n ];\n identifiers.forEach((identifier)=>this.router.unloadIdentifier(identifier));\n }\n get controllers() {\n return this.router.contexts.map((context)=>context.controller);\n }\n getControllerForElementAndIdentifier(element, identifier) {\n const context = this.router.getContextForElementAndIdentifier(element, identifier);\n return context ? context.controller : null;\n }\n handleError(error, message, detail) {\n var _a;\n this.logger.error(`%s\\n\\n%o\\n\\n%o`, message, error, detail);\n (_a = window.onerror) === null || _a === void 0 || _a.call(window, message, \"\", 0, 0, error);\n }\n logFormattedMessage(identifier, functionName, detail = {}) {\n detail = Object.assign({\n application: this\n }, detail);\n this.logger.groupCollapsed(`${identifier} #${functionName}`);\n this.logger.log(\"details:\", Object.assign({}, detail));\n this.logger.groupEnd();\n }\n}\nfunction $27d274cf1203127c$var$domReady() {\n return new Promise((resolve)=>{\n if (document.readyState == \"loading\") document.addEventListener(\"DOMContentLoaded\", ()=>resolve());\n else resolve();\n });\n}\nfunction $27d274cf1203127c$var$ClassPropertiesBlessing(constructor) {\n const classes = $27d274cf1203127c$var$readInheritableStaticArrayValues(constructor, \"classes\");\n return classes.reduce((properties, classDefinition)=>{\n return Object.assign(properties, $27d274cf1203127c$var$propertiesForClassDefinition(classDefinition));\n }, {});\n}\nfunction $27d274cf1203127c$var$propertiesForClassDefinition(key) {\n return {\n [`${key}Class`]: {\n get () {\n const { classes: classes } = this;\n if (classes.has(key)) return classes.get(key);\n else {\n const attribute = classes.getAttributeName(key);\n throw new Error(`Missing attribute \"${attribute}\"`);\n }\n }\n },\n [`${key}Classes`]: {\n get () {\n return this.classes.getAll(key);\n }\n },\n [`has${$27d274cf1203127c$var$capitalize(key)}Class`]: {\n get () {\n return this.classes.has(key);\n }\n }\n };\n}\nfunction $27d274cf1203127c$var$OutletPropertiesBlessing(constructor) {\n const outlets = $27d274cf1203127c$var$readInheritableStaticArrayValues(constructor, \"outlets\");\n return outlets.reduce((properties, outletDefinition)=>{\n return Object.assign(properties, $27d274cf1203127c$var$propertiesForOutletDefinition(outletDefinition));\n }, {});\n}\nfunction $27d274cf1203127c$var$getOutletController(controller, element, identifier) {\n return controller.application.getControllerForElementAndIdentifier(element, identifier);\n}\nfunction $27d274cf1203127c$var$getControllerAndEnsureConnectedScope(controller, element, outletName) {\n let outletController = $27d274cf1203127c$var$getOutletController(controller, element, outletName);\n if (outletController) return outletController;\n controller.application.router.proposeToConnectScopeForElementAndIdentifier(element, outletName);\n outletController = $27d274cf1203127c$var$getOutletController(controller, element, outletName);\n if (outletController) return outletController;\n}\nfunction $27d274cf1203127c$var$propertiesForOutletDefinition(name) {\n const camelizedName = $27d274cf1203127c$var$namespaceCamelize(name);\n return {\n [`${camelizedName}Outlet`]: {\n get () {\n const outletElement = this.outlets.find(name);\n const selector = this.outlets.getSelectorForOutletName(name);\n if (outletElement) {\n const outletController = $27d274cf1203127c$var$getControllerAndEnsureConnectedScope(this, outletElement, name);\n if (outletController) return outletController;\n throw new Error(`The provided outlet element is missing an outlet controller \"${name}\" instance for host controller \"${this.identifier}\"`);\n }\n throw new Error(`Missing outlet element \"${name}\" for host controller \"${this.identifier}\". Stimulus couldn't find a matching outlet element using selector \"${selector}\".`);\n }\n },\n [`${camelizedName}Outlets`]: {\n get () {\n const outlets = this.outlets.findAll(name);\n if (outlets.length > 0) return outlets.map((outletElement)=>{\n const outletController = $27d274cf1203127c$var$getControllerAndEnsureConnectedScope(this, outletElement, name);\n if (outletController) return outletController;\n console.warn(`The provided outlet element is missing an outlet controller \"${name}\" instance for host controller \"${this.identifier}\"`, outletElement);\n }).filter((controller)=>controller);\n return [];\n }\n },\n [`${camelizedName}OutletElement`]: {\n get () {\n const outletElement = this.outlets.find(name);\n const selector = this.outlets.getSelectorForOutletName(name);\n if (outletElement) return outletElement;\n else throw new Error(`Missing outlet element \"${name}\" for host controller \"${this.identifier}\". Stimulus couldn't find a matching outlet element using selector \"${selector}\".`);\n }\n },\n [`${camelizedName}OutletElements`]: {\n get () {\n return this.outlets.findAll(name);\n }\n },\n [`has${$27d274cf1203127c$var$capitalize(camelizedName)}Outlet`]: {\n get () {\n return this.outlets.has(name);\n }\n }\n };\n}\nfunction $27d274cf1203127c$var$TargetPropertiesBlessing(constructor) {\n const targets = $27d274cf1203127c$var$readInheritableStaticArrayValues(constructor, \"targets\");\n return targets.reduce((properties, targetDefinition)=>{\n return Object.assign(properties, $27d274cf1203127c$var$propertiesForTargetDefinition(targetDefinition));\n }, {});\n}\nfunction $27d274cf1203127c$var$propertiesForTargetDefinition(name) {\n return {\n [`${name}Target`]: {\n get () {\n const target = this.targets.find(name);\n if (target) return target;\n else throw new Error(`Missing target element \"${name}\" for \"${this.identifier}\" controller`);\n }\n },\n [`${name}Targets`]: {\n get () {\n return this.targets.findAll(name);\n }\n },\n [`has${$27d274cf1203127c$var$capitalize(name)}Target`]: {\n get () {\n return this.targets.has(name);\n }\n }\n };\n}\nfunction $27d274cf1203127c$var$ValuePropertiesBlessing(constructor) {\n const valueDefinitionPairs = $27d274cf1203127c$var$readInheritableStaticObjectPairs(constructor, \"values\");\n const propertyDescriptorMap = {\n valueDescriptorMap: {\n get () {\n return valueDefinitionPairs.reduce((result, valueDefinitionPair)=>{\n const valueDescriptor = $27d274cf1203127c$var$parseValueDefinitionPair(valueDefinitionPair, this.identifier);\n const attributeName = this.data.getAttributeNameForKey(valueDescriptor.key);\n return Object.assign(result, {\n [attributeName]: valueDescriptor\n });\n }, {});\n }\n }\n };\n return valueDefinitionPairs.reduce((properties, valueDefinitionPair)=>{\n return Object.assign(properties, $27d274cf1203127c$var$propertiesForValueDefinitionPair(valueDefinitionPair));\n }, propertyDescriptorMap);\n}\nfunction $27d274cf1203127c$var$propertiesForValueDefinitionPair(valueDefinitionPair, controller) {\n const definition = $27d274cf1203127c$var$parseValueDefinitionPair(valueDefinitionPair, controller);\n const { key: key, name: name, reader: read, writer: write } = definition;\n return {\n [name]: {\n get () {\n const value = this.data.get(key);\n if (value !== null) return read(value);\n else return definition.defaultValue;\n },\n set (value) {\n if (value === undefined) this.data.delete(key);\n else this.data.set(key, write(value));\n }\n },\n [`has${$27d274cf1203127c$var$capitalize(name)}`]: {\n get () {\n return this.data.has(key) || definition.hasCustomDefaultValue;\n }\n }\n };\n}\nfunction $27d274cf1203127c$var$parseValueDefinitionPair([token, typeDefinition], controller) {\n return $27d274cf1203127c$var$valueDescriptorForTokenAndTypeDefinition({\n controller: controller,\n token: token,\n typeDefinition: typeDefinition\n });\n}\nfunction $27d274cf1203127c$var$parseValueTypeConstant(constant) {\n switch(constant){\n case Array:\n return \"array\";\n case Boolean:\n return \"boolean\";\n case Number:\n return \"number\";\n case Object:\n return \"object\";\n case String:\n return \"string\";\n }\n}\nfunction $27d274cf1203127c$var$parseValueTypeDefault(defaultValue) {\n switch(typeof defaultValue){\n case \"boolean\":\n return \"boolean\";\n case \"number\":\n return \"number\";\n case \"string\":\n return \"string\";\n }\n if (Array.isArray(defaultValue)) return \"array\";\n if (Object.prototype.toString.call(defaultValue) === \"[object Object]\") return \"object\";\n}\nfunction $27d274cf1203127c$var$parseValueTypeObject(payload) {\n const { controller: controller, token: token, typeObject: typeObject } = payload;\n const hasType = $27d274cf1203127c$var$isSomething(typeObject.type);\n const hasDefault = $27d274cf1203127c$var$isSomething(typeObject.default);\n const fullObject = hasType && hasDefault;\n const onlyType = hasType && !hasDefault;\n const onlyDefault = !hasType && hasDefault;\n const typeFromObject = $27d274cf1203127c$var$parseValueTypeConstant(typeObject.type);\n const typeFromDefaultValue = $27d274cf1203127c$var$parseValueTypeDefault(payload.typeObject.default);\n if (onlyType) return typeFromObject;\n if (onlyDefault) return typeFromDefaultValue;\n if (typeFromObject !== typeFromDefaultValue) {\n const propertyPath = controller ? `${controller}.${token}` : token;\n throw new Error(`The specified default value for the Stimulus Value \"${propertyPath}\" must match the defined type \"${typeFromObject}\". The provided default value of \"${typeObject.default}\" is of type \"${typeFromDefaultValue}\".`);\n }\n if (fullObject) return typeFromObject;\n}\nfunction $27d274cf1203127c$var$parseValueTypeDefinition(payload) {\n const { controller: controller, token: token, typeDefinition: typeDefinition } = payload;\n const typeObject = {\n controller: controller,\n token: token,\n typeObject: typeDefinition\n };\n const typeFromObject = $27d274cf1203127c$var$parseValueTypeObject(typeObject);\n const typeFromDefaultValue = $27d274cf1203127c$var$parseValueTypeDefault(typeDefinition);\n const typeFromConstant = $27d274cf1203127c$var$parseValueTypeConstant(typeDefinition);\n const type = typeFromObject || typeFromDefaultValue || typeFromConstant;\n if (type) return type;\n const propertyPath = controller ? `${controller}.${typeDefinition}` : token;\n throw new Error(`Unknown value type \"${propertyPath}\" for \"${token}\" value`);\n}\nfunction $27d274cf1203127c$var$defaultValueForDefinition(typeDefinition) {\n const constant = $27d274cf1203127c$var$parseValueTypeConstant(typeDefinition);\n if (constant) return $27d274cf1203127c$var$defaultValuesByType[constant];\n const hasDefault = $27d274cf1203127c$var$hasProperty(typeDefinition, \"default\");\n const hasType = $27d274cf1203127c$var$hasProperty(typeDefinition, \"type\");\n const typeObject = typeDefinition;\n if (hasDefault) return typeObject.default;\n if (hasType) {\n const { type: type } = typeObject;\n const constantFromType = $27d274cf1203127c$var$parseValueTypeConstant(type);\n if (constantFromType) return $27d274cf1203127c$var$defaultValuesByType[constantFromType];\n }\n return typeDefinition;\n}\nfunction $27d274cf1203127c$var$valueDescriptorForTokenAndTypeDefinition(payload) {\n const { token: token, typeDefinition: typeDefinition } = payload;\n const key = `${$27d274cf1203127c$var$dasherize(token)}-value`;\n const type = $27d274cf1203127c$var$parseValueTypeDefinition(payload);\n return {\n type: type,\n key: key,\n name: $27d274cf1203127c$var$camelize(key),\n get defaultValue () {\n return $27d274cf1203127c$var$defaultValueForDefinition(typeDefinition);\n },\n get hasCustomDefaultValue () {\n return $27d274cf1203127c$var$parseValueTypeDefault(typeDefinition) !== undefined;\n },\n reader: $27d274cf1203127c$var$readers[type],\n writer: $27d274cf1203127c$var$writers[type] || $27d274cf1203127c$var$writers.default\n };\n}\nconst $27d274cf1203127c$var$defaultValuesByType = {\n get array () {\n return [];\n },\n boolean: false,\n number: 0,\n get object () {\n return {};\n },\n string: \"\"\n};\nconst $27d274cf1203127c$var$readers = {\n array (value) {\n const array = JSON.parse(value);\n if (!Array.isArray(array)) throw new TypeError(`expected value of type \"array\" but instead got value \"${value}\" of type \"${$27d274cf1203127c$var$parseValueTypeDefault(array)}\"`);\n return array;\n },\n boolean (value) {\n return !(value == \"0\" || String(value).toLowerCase() == \"false\");\n },\n number (value) {\n return Number(value.replace(/_/g, \"\"));\n },\n object (value) {\n const object = JSON.parse(value);\n if (object === null || typeof object != \"object\" || Array.isArray(object)) throw new TypeError(`expected value of type \"object\" but instead got value \"${value}\" of type \"${$27d274cf1203127c$var$parseValueTypeDefault(object)}\"`);\n return object;\n },\n string (value) {\n return value;\n }\n};\nconst $27d274cf1203127c$var$writers = {\n default: $27d274cf1203127c$var$writeString,\n array: $27d274cf1203127c$var$writeJSON,\n object: $27d274cf1203127c$var$writeJSON\n};\nfunction $27d274cf1203127c$var$writeJSON(value) {\n return JSON.stringify(value);\n}\nfunction $27d274cf1203127c$var$writeString(value) {\n return `${value}`;\n}\nclass $27d274cf1203127c$export$bd0bf19f25da8474 {\n constructor(context){\n this.context = context;\n }\n static get shouldLoad() {\n return true;\n }\n static afterLoad(_identifier, _application) {\n return;\n }\n get application() {\n return this.context.application;\n }\n get scope() {\n return this.context.scope;\n }\n get element() {\n return this.scope.element;\n }\n get identifier() {\n return this.scope.identifier;\n }\n get targets() {\n return this.scope.targets;\n }\n get outlets() {\n return this.scope.outlets;\n }\n get classes() {\n return this.scope.classes;\n }\n get data() {\n return this.scope.data;\n }\n initialize() {}\n connect() {}\n disconnect() {}\n dispatch(eventName, { target: target = this.element, detail: detail = {}, prefix: prefix = this.identifier, bubbles: bubbles = true, cancelable: cancelable = true } = {}) {\n const type = prefix ? `${prefix}:${eventName}` : eventName;\n const event = new CustomEvent(type, {\n detail: detail,\n bubbles: bubbles,\n cancelable: cancelable\n });\n target.dispatchEvent(event);\n return event;\n }\n}\n$27d274cf1203127c$export$bd0bf19f25da8474.blessings = [\n $27d274cf1203127c$var$ClassPropertiesBlessing,\n $27d274cf1203127c$var$TargetPropertiesBlessing,\n $27d274cf1203127c$var$ValuePropertiesBlessing,\n $27d274cf1203127c$var$OutletPropertiesBlessing\n];\n$27d274cf1203127c$export$bd0bf19f25da8474.targets = [];\n$27d274cf1203127c$export$bd0bf19f25da8474.outlets = [];\n$27d274cf1203127c$export$bd0bf19f25da8474.values = {};\n\n\n\nclass $ebfa444edf7e74f3$export$2e2bcd8739ae039 extends (0, $27d274cf1203127c$export$bd0bf19f25da8474) {\n connect() {\n this.element.querySelectorAll(\"[data-accordion-trigger]\").forEach((trigger)=>{\n trigger.addEventListener(\"click\", this.toggle.bind(this));\n });\n }\n toggle(event) {\n const item = event.currentTarget.closest(\".Orbital-Accordion-Item\");\n if (!item) return;\n const content = item.querySelector(\".Orbital-Accordion-Item-Content\");\n if (!content) return;\n const isOpen = content.dataset.state === \"open\";\n if (isOpen) {\n content.style.height = `${content.scrollHeight}px`;\n content.offsetHeight // force reflow\n ;\n content.style.height = \"0px\";\n content.addEventListener(\"transitionend\", ()=>{\n content.dataset.state = \"closed\";\n content.style.height = \"\";\n }, {\n once: true\n });\n } else {\n content.dataset.state = \"open\";\n content.style.height = \"0px\";\n content.offsetHeight // force reflow\n ;\n content.style.height = `${content.scrollHeight}px`;\n content.addEventListener(\"transitionend\", ()=>{\n content.style.height = \"\";\n }, {\n once: true\n });\n }\n }\n}\n\n\n\nclass $e0d42db4f8500502$export$2e2bcd8739ae039 extends (0, $27d274cf1203127c$export$bd0bf19f25da8474) {\n static targets = [\n \"image\",\n \"fallback\"\n ];\n imageError() {\n if (this.hasImageTarget) this.imageTarget.style.display = \"none\";\n if (this.hasFallbackTarget) this.fallbackTarget.style.display = \"flex\";\n }\n}\n\n\n\nclass $334ff5ad33338129$export$2e2bcd8739ae039 extends (0, $27d274cf1203127c$export$bd0bf19f25da8474) {\n static targets = [\n \"item\"\n ];\n connect() {\n this.currentIndex = -1;\n }\n handleKeydown(event) {\n const items = this.getEnabledItems();\n if (items.length === 0) return;\n switch(event.key){\n case \"ArrowDown\":\n event.preventDefault();\n this.focusNext(items);\n break;\n case \"ArrowUp\":\n event.preventDefault();\n this.focusPrevious(items);\n break;\n case \"Home\":\n event.preventDefault();\n this.focusFirst(items);\n break;\n case \"End\":\n event.preventDefault();\n this.focusLast(items);\n break;\n case \"ArrowRight\":\n if (event.target.hasAttribute(\"aria-haspopup\")) {\n event.preventDefault();\n this.activateItem(event.target);\n }\n break;\n case \"Enter\":\n case \" \":\n event.preventDefault();\n this.activateItem(event.target);\n break;\n case \"Escape\":\n event.preventDefault();\n this.closeMenu();\n break;\n default:\n // Type-ahead: focus item starting with pressed key\n if (event.key.length === 1 && /^[a-z0-9]$/i.test(event.key)) this.focusItemStartingWith(items, event.key);\n }\n }\n getEnabledItems() {\n const items = [];\n for (const child of this.element.children){\n if (child.getAttribute(\"role\") === \"menuitem\" && !child.hasAttribute(\"data-disabled\") && child.getAttribute(\"aria-disabled\") !== \"true\") items.push(child);\n else if (child.classList.contains(\"Orbital-Menu-Sub\")) {\n const trigger = child.querySelector(\":scope > .Orbital-Menu-Sub-Trigger\");\n if (trigger) items.push(trigger);\n }\n }\n return items;\n }\n focusNext(items) {\n const active = items.indexOf(document.activeElement);\n this.currentIndex = active < items.length - 1 ? active + 1 : 0;\n this.updateFocus(items);\n }\n focusPrevious(items) {\n const active = items.indexOf(document.activeElement);\n this.currentIndex = active > 0 ? active - 1 : items.length - 1;\n this.updateFocus(items);\n }\n focusFirst(items) {\n this.currentIndex = 0;\n this.updateFocus(items);\n }\n focusLast(items) {\n this.currentIndex = items.length - 1;\n this.updateFocus(items);\n }\n updateFocus(items = null) {\n const enabledItems = items || this.getEnabledItems();\n if (enabledItems.length === 0) return;\n // Ensure currentIndex is valid\n this.currentIndex = Math.max(0, Math.min(this.currentIndex, enabledItems.length - 1));\n // Update tabindex for roving tabindex pattern\n enabledItems.forEach((item, index)=>{\n if (index === this.currentIndex) {\n item.setAttribute(\"tabindex\", \"0\");\n item.focus();\n } else item.setAttribute(\"tabindex\", \"-1\");\n });\n }\n activateItem(item) {\n // Check if it's a submenu trigger\n if (item.hasAttribute(\"aria-haspopup\")) {\n const subController = this.application.getControllerForElementAndIdentifier(item.closest('[data-controller*=\"orbital-menu-sub\"]'), \"orbital-menu-sub\");\n if (subController) subController.toggle();\n } else // Activate the menu item (trigger click)\n item.click();\n }\n focusItemStartingWith(items, key) {\n const lowerKey = key.toLowerCase();\n const startIndex = (this.currentIndex + 1) % items.length;\n // Search from current position forward\n for(let i = 0; i < items.length; i++){\n const index = (startIndex + i) % items.length;\n const item = items[index];\n const text = item.textContent.trim().toLowerCase();\n if (text.startsWith(lowerKey)) {\n this.currentIndex = index;\n this.updateFocus(items);\n return;\n }\n }\n }\n closeMenu() {\n // If inside a popover, close it\n const popover = this.element.closest(\"[popover]\");\n if (popover) popover.hidePopover();\n // If inside a submenu, close it\n const submenu = this.element.closest(\".Orbital-Menu-Sub\");\n if (submenu) {\n const subController = this.application.getControllerForElementAndIdentifier(submenu, \"orbital-menu-sub\");\n if (subController) subController.close();\n }\n }\n}\n\n\n\nclass $7622594fb0c0d38c$export$2e2bcd8739ae039 extends (0, $27d274cf1203127c$export$bd0bf19f25da8474) {\n static targets = [\n \"trigger\",\n \"content\"\n ];\n connect() {\n this._onClickOutside = (e)=>{\n if (this.element.getAttribute(\"data-state\") === \"open\" && !this.element.contains(e.target)) this.close(false);\n };\n }\n disconnect() {\n document.removeEventListener(\"click\", this._onClickOutside);\n }\n toggle() {\n const isOpen = this.element.getAttribute(\"data-state\") === \"open\";\n if (isOpen) this.close();\n else this.open();\n }\n open() {\n this.element.setAttribute(\"data-state\", \"open\");\n this.triggerTarget.setAttribute(\"aria-expanded\", \"true\");\n document.addEventListener(\"click\", this._onClickOutside);\n requestAnimationFrame(()=>{\n const firstItem = this.contentTarget.querySelector('[role=\"menuitem\"]');\n if (firstItem) firstItem.focus();\n });\n }\n close(refocus = true) {\n this.element.setAttribute(\"data-state\", \"closed\");\n this.triggerTarget.setAttribute(\"aria-expanded\", \"false\");\n document.removeEventListener(\"click\", this._onClickOutside);\n if (refocus) this.triggerTarget.focus();\n }\n handleKeydown(event) {\n const items = [\n ...this.contentTarget.querySelectorAll('[role=\"menuitem\"]:not([aria-disabled=\"true\"])')\n ];\n if (!items.length) return;\n const current = items.indexOf(document.activeElement);\n switch(event.key){\n case \"ArrowDown\":\n event.preventDefault();\n event.stopPropagation();\n items[current < items.length - 1 ? current + 1 : 0].focus();\n break;\n case \"ArrowUp\":\n event.preventDefault();\n event.stopPropagation();\n items[current > 0 ? current - 1 : items.length - 1].focus();\n break;\n case \"ArrowLeft\":\n case \"Escape\":\n event.preventDefault();\n event.stopPropagation();\n this.close();\n break;\n case \"Enter\":\n case \" \":\n event.stopPropagation();\n break;\n }\n }\n}\n\n\n\nclass $047eab1dbee5a24a$export$2e2bcd8739ae039 extends (0, $27d274cf1203127c$export$bd0bf19f25da8474) {\n static values = {\n open: {\n type: Boolean,\n default: false\n },\n dismissible: {\n type: Boolean,\n default: true\n }\n };\n static targets = [\n \"panel\"\n ];\n connect() {\n this._handleKeydown = this.handleKeydown.bind(this);\n this._previouslyFocused = null;\n this._originalStyles = null;\n this._scrollY = 0;\n if (this.openValue) requestAnimationFrame(()=>this.show());\n }\n disconnect() {\n this._restoreScrollLock();\n document.removeEventListener(\"keydown\", this._handleKeydown);\n }\n show() {\n if (this.element.dataset.state === \"open\") return;\n this._previouslyFocused = document.activeElement;\n this.element.setAttribute(\"data-state\", \"open\");\n this._applyScrollLock();\n document.addEventListener(\"keydown\", this._handleKeydown);\n requestAnimationFrame(()=>this._focusFirst());\n this.element.dispatchEvent(new CustomEvent(\"orbital:modal:open\", {\n bubbles: true\n }));\n }\n close() {\n if (this.element.dataset.state === \"closed\") return;\n this.element.setAttribute(\"data-state\", \"closed\");\n this._restoreScrollLock();\n document.removeEventListener(\"keydown\", this._handleKeydown);\n if (this._previouslyFocused && typeof this._previouslyFocused.focus === \"function\") {\n this._previouslyFocused.focus();\n this._previouslyFocused = null;\n }\n this.element.dispatchEvent(new CustomEvent(\"orbital:modal:close\", {\n bubbles: true\n }));\n this._clearTurboFrame();\n }\n backdropClick(event) {\n if (event.target === event.currentTarget && this.dismissibleValue) this.close();\n }\n handleKeydown(event) {\n if (event.key === \"Escape\") {\n event.preventDefault();\n event.stopPropagation();\n if (this.dismissibleValue) this.close();\n return;\n }\n if (event.key === \"Tab\") this._trapFocus(event);\n }\n _applyScrollLock() {\n if (document.body.dataset.orbitalScrollLocked) return;\n this._scrollY = window.scrollY;\n const htmlStyle = getComputedStyle(document.documentElement);\n const hasStableGutter = htmlStyle.scrollbarGutter?.includes(\"stable\");\n this._originalStyles = {\n overflow: document.body.style.overflow,\n paddingRight: document.body.style.paddingRight\n };\n document.body.style.overflow = \"hidden\";\n if (!hasStableGutter) {\n const scrollbarWidth = window.innerWidth - document.documentElement.clientWidth;\n if (scrollbarWidth > 0) document.body.style.paddingRight = `${scrollbarWidth}px`;\n }\n document.body.dataset.orbitalScrollLocked = \"true\";\n }\n _restoreScrollLock() {\n if (!this._originalStyles) return;\n document.body.style.overflow = this._originalStyles.overflow;\n document.body.style.paddingRight = this._originalStyles.paddingRight;\n delete document.body.dataset.orbitalScrollLocked;\n this._originalStyles = null;\n }\n _focusableElements() {\n if (!this.hasPanelTarget) return [];\n const selector = [\n \"a[href]\",\n \"button:not([disabled])\",\n \"input:not([disabled]):not([type='hidden'])\",\n \"select:not([disabled])\",\n \"textarea:not([disabled])\",\n \"[tabindex]:not([tabindex='-1'])\",\n \"[contenteditable]\"\n ].join(\", \");\n return [\n ...this.panelTarget.querySelectorAll(selector)\n ].filter((el)=>!el.closest(\"[hidden]\") && !el.closest(\"[aria-hidden='true']\"));\n }\n _focusFirst() {\n const focusable = this._focusableElements();\n if (focusable.length > 0) focusable[0].focus({\n preventScroll: true\n });\n else if (this.hasPanelTarget) {\n this.panelTarget.setAttribute(\"tabindex\", \"-1\");\n this.panelTarget.focus({\n preventScroll: true\n });\n }\n }\n _trapFocus(event) {\n const focusable = this._focusableElements();\n if (focusable.length === 0) return;\n const first = focusable[0];\n const last = focusable[focusable.length - 1];\n if (event.shiftKey) {\n if (document.activeElement === first) {\n event.preventDefault();\n last.focus({\n preventScroll: true\n });\n }\n } else if (document.activeElement === last) {\n event.preventDefault();\n first.focus({\n preventScroll: true\n });\n }\n }\n _clearTurboFrame() {\n const frame = this.element.closest(\"turbo-frame\");\n if (frame) {\n frame.innerHTML = \"\";\n frame.removeAttribute(\"src\");\n frame.removeAttribute(\"complete\");\n }\n }\n}\n\n\n/**\n * Custom positioning reference element.\n * @see https://floating-ui.com/docs/virtual-elements\n */ const $93031e4206e8e991$export$832b6fa47fa053d2 = [\n 'top',\n 'right',\n 'bottom',\n 'left'\n];\nconst $93031e4206e8e991$export$27b07d8a310ed8b5 = [\n 'start',\n 'end'\n];\nconst $93031e4206e8e991$export$803cd8101b6c182b = /*#__PURE__*/ $93031e4206e8e991$export$832b6fa47fa053d2.reduce((acc, side)=>acc.concat(side, side + \"-\" + $93031e4206e8e991$export$27b07d8a310ed8b5[0], side + \"-\" + $93031e4206e8e991$export$27b07d8a310ed8b5[1]), []);\nconst $93031e4206e8e991$export$96ec731ed4dcb222 = Math.min;\nconst $93031e4206e8e991$export$8960430cfd85939f = Math.max;\nconst $93031e4206e8e991$export$2077e0241d6afd3c = Math.round;\nconst $93031e4206e8e991$export$a3fe094919f356fd = Math.floor;\nconst $93031e4206e8e991$export$a397704b5e280835 = (v)=>({\n x: v,\n y: v\n });\nconst $93031e4206e8e991$var$oppositeSideMap = {\n left: 'right',\n right: 'left',\n bottom: 'top',\n top: 'bottom'\n};\nfunction $93031e4206e8e991$export$7d15b64cf5a3a4c4(start, value, end) {\n return $93031e4206e8e991$export$8960430cfd85939f(start, $93031e4206e8e991$export$96ec731ed4dcb222(value, end));\n}\nfunction $93031e4206e8e991$export$fef61f332f2c0afc(value, param) {\n return typeof value === 'function' ? value(param) : value;\n}\nfunction $93031e4206e8e991$export$3c915306cb7fc97a(placement) {\n return placement.split('-')[0];\n}\nfunction $93031e4206e8e991$export$f0989780f32bfcda(placement) {\n return placement.split('-')[1];\n}\nfunction $93031e4206e8e991$export$8a000a963141ac32(axis) {\n return axis === 'x' ? 'y' : 'x';\n}\nfunction $93031e4206e8e991$export$320bd9d53520c68a(axis) {\n return axis === 'y' ? 'height' : 'width';\n}\nfunction $93031e4206e8e991$export$f28e8f882010718a(placement) {\n const firstChar = placement[0];\n return firstChar === 't' || firstChar === 'b' ? 'y' : 'x';\n}\nfunction $93031e4206e8e991$export$2b57e0052a6d6d4c(placement) {\n return $93031e4206e8e991$export$8a000a963141ac32($93031e4206e8e991$export$f28e8f882010718a(placement));\n}\nfunction $93031e4206e8e991$export$be42861551f17911(placement, rects, rtl) {\n if (rtl === void 0) rtl = false;\n const alignment = $93031e4206e8e991$export$f0989780f32bfcda(placement);\n const alignmentAxis = $93031e4206e8e991$export$2b57e0052a6d6d4c(placement);\n const length = $93031e4206e8e991$export$320bd9d53520c68a(alignmentAxis);\n let mainAlignmentSide = alignmentAxis === 'x' ? alignment === (rtl ? 'end' : 'start') ? 'right' : 'left' : alignment === 'start' ? 'bottom' : 'top';\n if (rects.reference[length] > rects.floating[length]) mainAlignmentSide = $93031e4206e8e991$export$9c5e28bad23365fa(mainAlignmentSide);\n return [\n mainAlignmentSide,\n $93031e4206e8e991$export$9c5e28bad23365fa(mainAlignmentSide)\n ];\n}\nfunction $93031e4206e8e991$export$496432a3699e50b1(placement) {\n const oppositePlacement = $93031e4206e8e991$export$9c5e28bad23365fa(placement);\n return [\n $93031e4206e8e991$export$2b182c584985588b(placement),\n oppositePlacement,\n $93031e4206e8e991$export$2b182c584985588b(oppositePlacement)\n ];\n}\nfunction $93031e4206e8e991$export$2b182c584985588b(placement) {\n return placement.includes('start') ? placement.replace('start', 'end') : placement.replace('end', 'start');\n}\nconst $93031e4206e8e991$var$lrPlacement = [\n 'left',\n 'right'\n];\nconst $93031e4206e8e991$var$rlPlacement = [\n 'right',\n 'left'\n];\nconst $93031e4206e8e991$var$tbPlacement = [\n 'top',\n 'bottom'\n];\nconst $93031e4206e8e991$var$btPlacement = [\n 'bottom',\n 'top'\n];\nfunction $93031e4206e8e991$var$getSideList(side, isStart, rtl) {\n switch(side){\n case 'top':\n case 'bottom':\n if (rtl) return isStart ? $93031e4206e8e991$var$rlPlacement : $93031e4206e8e991$var$lrPlacement;\n return isStart ? $93031e4206e8e991$var$lrPlacement : $93031e4206e8e991$var$rlPlacement;\n case 'left':\n case 'right':\n return isStart ? $93031e4206e8e991$var$tbPlacement : $93031e4206e8e991$var$btPlacement;\n default:\n return [];\n }\n}\nfunction $93031e4206e8e991$export$a9b6fb18fd92c3ec(placement, flipAlignment, direction, rtl) {\n const alignment = $93031e4206e8e991$export$f0989780f32bfcda(placement);\n let list = $93031e4206e8e991$var$getSideList($93031e4206e8e991$export$3c915306cb7fc97a(placement), direction === 'start', rtl);\n if (alignment) {\n list = list.map((side)=>side + \"-\" + alignment);\n if (flipAlignment) list = list.concat(list.map($93031e4206e8e991$export$2b182c584985588b));\n }\n return list;\n}\nfunction $93031e4206e8e991$export$9c5e28bad23365fa(placement) {\n const side = $93031e4206e8e991$export$3c915306cb7fc97a(placement);\n return $93031e4206e8e991$var$oppositeSideMap[side] + placement.slice(side.length);\n}\nfunction $93031e4206e8e991$export$1c66dbf1a9e34223(padding) {\n var _padding$top, _padding$right, _padding$bottom, _padding$left;\n return {\n top: (_padding$top = padding.top) != null ? _padding$top : 0,\n right: (_padding$right = padding.right) != null ? _padding$right : 0,\n bottom: (_padding$bottom = padding.bottom) != null ? _padding$bottom : 0,\n left: (_padding$left = padding.left) != null ? _padding$left : 0\n };\n}\nfunction $93031e4206e8e991$export$598c291c29bc2e71(padding) {\n return typeof padding !== 'number' ? $93031e4206e8e991$export$1c66dbf1a9e34223(padding) : {\n top: padding,\n right: padding,\n bottom: padding,\n left: padding\n };\n}\nfunction $93031e4206e8e991$export$ee05aea0aeecbad4(rect) {\n const { x: x, y: y, width: width, height: height } = rect;\n return {\n width: width,\n height: height,\n top: y,\n left: x,\n right: x + width,\n bottom: y + height,\n x: x,\n y: y\n };\n}\n\n\nfunction $28f1bf2594995773$var$computeCoordsFromPlacement(_ref, placement, rtl) {\n let { reference: reference, floating: floating } = _ref;\n const sideAxis = (0, $93031e4206e8e991$export$f28e8f882010718a)(placement);\n const alignmentAxis = (0, $93031e4206e8e991$export$2b57e0052a6d6d4c)(placement);\n const alignLength = (0, $93031e4206e8e991$export$320bd9d53520c68a)(alignmentAxis);\n const side = (0, $93031e4206e8e991$export$3c915306cb7fc97a)(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 const alignment = (0, $93031e4206e8e991$export$f0989780f32bfcda)(placement);\n if (alignment) coords[alignmentAxis] += commonAlign * (alignment === 'end' ? 1 : -1) * (rtl && isVertical ? -1 : 1);\n return coords;\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 */ async function $28f1bf2594995773$export$37b6bde19b108ecc(state, options) {\n var _await$platform$isEle;\n if (options === void 0) options = {};\n const { x: x, y: y, platform: platform, rects: rects, elements: elements, strategy: strategy } = state;\n const { boundary: boundary = 'clippingAncestors', rootBoundary: rootBoundary = 'viewport', elementContext: elementContext = 'floating', altBoundary: altBoundary = false, padding: padding = 0 } = (0, $93031e4206e8e991$export$fef61f332f2c0afc)(options, state);\n const paddingObject = (0, $93031e4206e8e991$export$598c291c29bc2e71)(padding);\n const altContext = elementContext === 'floating' ? 'reference' : 'floating';\n const element = elements[altBoundary ? altContext : elementContext];\n const clippingClientRect = (0, $93031e4206e8e991$export$ee05aea0aeecbad4)(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: boundary,\n rootBoundary: rootBoundary,\n strategy: strategy\n }));\n const rect = elementContext === 'floating' ? {\n x: x,\n y: 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 const elementClientRect = (0, $93031e4206e8e991$export$ee05aea0aeecbad4)(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({\n elements: elements,\n rect: rect,\n offsetParent: offsetParent,\n strategy: 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// Maximum number of resets that can occur before bailing to avoid infinite reset loops.\nconst $28f1bf2594995773$var$MAX_RESET_COUNT = 50;\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 */ const $28f1bf2594995773$export$48a53dcb22e581d0 = async (reference, floating, config)=>{\n const { placement: placement = 'bottom', strategy: strategy = 'absolute', middleware: middleware = [], platform: platform } = config;\n const platformWithDetectOverflow = platform.detectOverflow ? platform : {\n ...platform,\n detectOverflow: $28f1bf2594995773$export$37b6bde19b108ecc\n };\n const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating));\n let rects = await platform.getElementRects({\n reference: reference,\n floating: floating,\n strategy: strategy\n });\n let { x: x, y: y } = $28f1bf2594995773$var$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) continue;\n const { name: name, fn: fn } = currentMiddleware;\n const { x: nextX, y: nextY, data: data, reset: reset } = await fn({\n x: x,\n y: y,\n initialPlacement: placement,\n placement: statefulPlacement,\n strategy: strategy,\n middlewareData: middlewareData,\n rects: rects,\n platform: platformWithDetectOverflow,\n elements: {\n reference: reference,\n floating: 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 < $28f1bf2594995773$var$MAX_RESET_COUNT) {\n resetCount++;\n if (typeof reset === 'object') {\n if (reset.placement) statefulPlacement = reset.placement;\n if (reset.rects) rects = reset.rects === true ? await platform.getElementRects({\n reference: reference,\n floating: floating,\n strategy: strategy\n }) : reset.rects;\n ({ x: x, y: y } = $28f1bf2594995773$var$computeCoordsFromPlacement(rects, statefulPlacement, rtl));\n }\n i = -1;\n }\n }\n return {\n x: x,\n y: y,\n placement: statefulPlacement,\n strategy: strategy,\n middlewareData: middlewareData\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 */ const $28f1bf2594995773$export$f2120bbfa5450bd2 = (options)=>({\n name: 'arrow',\n options: options,\n async fn (state) {\n const { x: x, y: y, placement: placement, rects: rects, platform: platform, elements: elements, middlewareData: middlewareData } = state;\n // Since `element` is required, we don't Partial<> the type.\n const { element: element, padding: padding = 0 } = (0, $93031e4206e8e991$export$fef61f332f2c0afc)(options, state) || {};\n if (element == null) return {};\n const paddingObject = (0, $93031e4206e8e991$export$598c291c29bc2e71)(padding);\n const coords = {\n x: x,\n y: y\n };\n const axis = (0, $93031e4206e8e991$export$2b57e0052a6d6d4c)(placement);\n const length = (0, $93031e4206e8e991$export$320bd9d53520c68a)(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 // DOM platform can return `window` as the `offsetParent`.\n if (!clientSize || !await (platform.isElement == null ? void 0 : platform.isElement(arrowOffsetParent))) clientSize = elements.floating[clientProp] || rects.floating[length];\n const centerToReference = endDiff / 2 - startDiff / 2;\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 = (0, $93031e4206e8e991$export$96ec731ed4dcb222)(paddingObject[minProp], largestPossiblePadding);\n const maxPadding = (0, $93031e4206e8e991$export$96ec731ed4dcb222)(paddingObject[maxProp], largestPossiblePadding);\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 max = clientSize - arrowDimensions[length] - maxPadding;\n const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;\n const offset = (0, $93031e4206e8e991$export$7d15b64cf5a3a4c4)(minPadding, center, max);\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 && (0, $93031e4206e8e991$export$f0989780f32bfcda)(placement) != null && center !== offset && rects.reference[length] / 2 - (center < minPadding ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0;\n const alignmentOffset = shouldAddOffset ? center < minPadding ? center - minPadding : center - max : 0;\n return {\n [axis]: coords[axis] + alignmentOffset,\n data: {\n [axis]: offset,\n centerOffset: center - offset - alignmentOffset,\n ...shouldAddOffset && {\n alignmentOffset: alignmentOffset\n }\n },\n reset: shouldAddOffset\n };\n }\n });\nfunction $28f1bf2594995773$var$getPlacementList(alignment, autoAlignment, allowedPlacements) {\n const allowedPlacementsSortedByAlignment = alignment ? [\n ...allowedPlacements.filter((placement)=>(0, $93031e4206e8e991$export$f0989780f32bfcda)(placement) === alignment),\n ...allowedPlacements.filter((placement)=>(0, $93031e4206e8e991$export$f0989780f32bfcda)(placement) !== alignment)\n ] : allowedPlacements.filter((placement)=>(0, $93031e4206e8e991$export$3c915306cb7fc97a)(placement) === placement);\n return allowedPlacementsSortedByAlignment.filter((placement)=>{\n if (alignment) return (0, $93031e4206e8e991$export$f0989780f32bfcda)(placement) === alignment || (autoAlignment ? (0, $93031e4206e8e991$export$2b182c584985588b)(placement) !== placement : false);\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 */ const $28f1bf2594995773$export$91fb6ecbd551914 = function(options) {\n if (options === void 0) options = {};\n return {\n name: 'autoPlacement',\n options: options,\n async fn (state) {\n var _middlewareData$autoP, _middlewareData$autoP2, _placementsThatFitOnE;\n const { rects: rects, middlewareData: middlewareData, placement: placement, platform: platform, elements: elements } = state;\n const { crossAxis: crossAxis = false, alignment: alignment, allowedPlacements: allowedPlacements = (0, $93031e4206e8e991$export$803cd8101b6c182b), autoAlignment: autoAlignment = true, ...detectOverflowOptions } = (0, $93031e4206e8e991$export$fef61f332f2c0afc)(options, state);\n const placements$1 = alignment !== undefined || allowedPlacements === (0, $93031e4206e8e991$export$803cd8101b6c182b) ? $28f1bf2594995773$var$getPlacementList(alignment || null, autoAlignment, allowedPlacements) : allowedPlacements;\n const currentIndex = ((_middlewareData$autoP = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP.index) || 0;\n const currentPlacement = placements$1[currentIndex];\n if (currentPlacement == null) return {};\n // Make `computeCoords` start from the right place.\n if (placement !== currentPlacement) return {\n reset: {\n placement: placements$1[0]\n }\n };\n const overflow = await platform.detectOverflow(state, detectOverflowOptions);\n const alignmentSides = (0, $93031e4206e8e991$export$be42861551f17911)(currentPlacement, rects, await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating)));\n const currentOverflows = [\n overflow[(0, $93031e4206e8e991$export$3c915306cb7fc97a)(currentPlacement)],\n overflow[alignmentSides[0]],\n overflow[alignmentSides[1]]\n ];\n const allOverflows = [\n ...((_middlewareData$autoP2 = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP2.overflows) || [],\n {\n placement: currentPlacement,\n overflows: currentOverflows\n }\n ];\n const nextPlacement = placements$1[currentIndex + 1];\n // There are more placements to check.\n if (nextPlacement) return {\n data: {\n index: currentIndex + 1,\n overflows: allOverflows\n },\n reset: {\n placement: nextPlacement\n }\n };\n const placementsSortedByMostSpace = allOverflows.map((d)=>{\n const alignment = (0, $93031e4206e8e991$export$f0989780f32bfcda)(d.placement);\n return [\n d.placement,\n alignment && crossAxis ? // Check along the mainAxis and main crossAxis side.\n d.overflows.slice(0, 2).reduce((acc, v)=>acc + v, 0) : // Check only the mainAxis.\n d.overflows[0],\n d.overflows\n ];\n }).sort((a, b)=>a[1] - b[1]);\n const placementsThatFitOnEachSide = placementsSortedByMostSpace.filter((d)=>d[2].slice(0, // Aligned placements should not check their opposite crossAxis\n // side.\n (0, $93031e4206e8e991$export$f0989780f32bfcda)(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) return {\n data: {\n index: currentIndex + 1,\n overflows: allOverflows\n },\n reset: {\n placement: resetPlacement\n }\n };\n return {};\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 */ const $28f1bf2594995773$export$8a83211c878a3f1f = function(options) {\n if (options === void 0) options = {};\n return {\n name: 'flip',\n options: options,\n async fn (state) {\n var _middlewareData$arrow, _middlewareData$flip;\n const { placement: placement, middlewareData: middlewareData, rects: rects, initialPlacement: initialPlacement, platform: platform, elements: elements } = state;\n const { mainAxis: checkMainAxis = true, crossAxis: checkCrossAxis = true, fallbackPlacements: specifiedFallbackPlacements, fallbackStrategy: fallbackStrategy = 'bestFit', fallbackAxisSideDirection: fallbackAxisSideDirection = 'none', flipAlignment: flipAlignment = true, ...detectOverflowOptions } = (0, $93031e4206e8e991$export$fef61f332f2c0afc)(options, state);\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) return {};\n const side = (0, $93031e4206e8e991$export$3c915306cb7fc97a)(placement);\n const initialSideAxis = (0, $93031e4206e8e991$export$f28e8f882010718a)(initialPlacement);\n const isBasePlacement = (0, $93031e4206e8e991$export$3c915306cb7fc97a)(initialPlacement) === initialPlacement;\n const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));\n const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [\n (0, $93031e4206e8e991$export$9c5e28bad23365fa)(initialPlacement)\n ] : (0, $93031e4206e8e991$export$496432a3699e50b1)(initialPlacement));\n const hasFallbackAxisSideDirection = fallbackAxisSideDirection !== 'none';\n if (!specifiedFallbackPlacements && hasFallbackAxisSideDirection) fallbackPlacements.push(...(0, $93031e4206e8e991$export$a9b6fb18fd92c3ec)(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));\n const placements = [\n initialPlacement,\n ...fallbackPlacements\n ];\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) overflows.push(overflow[side]);\n if (checkCrossAxis) {\n const sides = (0, $93031e4206e8e991$export$be42861551f17911)(placement, rects, rtl);\n overflows.push(overflow[sides[0]], overflow[sides[1]]);\n }\n overflowsData = [\n ...overflowsData,\n {\n placement: placement,\n overflows: 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 !== (0, $93031e4206e8e991$export$f28e8f882010718a)(nextPlacement) : false;\n if (!ignoreCrossAxisOverflow || // We leave the current main axis only if every placement on that axis\n // overflows the main axis.\n overflowsData.every((d)=>(0, $93031e4206e8e991$export$f28e8f882010718a)(d.placement) === initialSideAxis ? d.overflows[0] > 0 : true)) // 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 // 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 // Otherwise fallback.\n if (!resetPlacement) switch(fallbackStrategy){\n case 'bestFit':\n {\n var _overflowsData$filter2;\n const placement = (_overflowsData$filter2 = overflowsData.filter((d)=>{\n if (hasFallbackAxisSideDirection) {\n const currentSideAxis = (0, $93031e4206e8e991$export$f28e8f882010718a)(d.placement);\n return currentSideAxis === initialSideAxis || // 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)=>[\n d.placement,\n d.overflows.filter((overflow)=>overflow > 0).reduce((acc, overflow)=>acc + overflow, 0)\n ]).sort((a, b)=>a[1] - b[1])[0]) == null ? void 0 : _overflowsData$filter2[0];\n if (placement) resetPlacement = placement;\n break;\n }\n case 'initialPlacement':\n resetPlacement = initialPlacement;\n break;\n }\n if (placement !== resetPlacement) return {\n reset: {\n placement: resetPlacement\n }\n };\n }\n return {};\n }\n };\n};\nfunction $28f1bf2594995773$var$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 $28f1bf2594995773$var$isAnySideFullyClipped(overflow) {\n return (0, $93031e4206e8e991$export$832b6fa47fa053d2).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 */ const $28f1bf2594995773$export$fe8985bb6374093c = function(options) {\n if (options === void 0) options = {};\n return {\n name: 'hide',\n options: options,\n async fn (state) {\n const { rects: rects, platform: platform } = state;\n const { strategy: strategy = 'referenceHidden', ...detectOverflowOptions } = (0, $93031e4206e8e991$export$fef61f332f2c0afc)(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 = $28f1bf2594995773$var$getSideOffsets(overflow, rects.reference);\n return {\n data: {\n referenceHiddenOffsets: offsets,\n referenceHidden: $28f1bf2594995773$var$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 = $28f1bf2594995773$var$getSideOffsets(overflow, rects.floating);\n return {\n data: {\n escapedOffsets: offsets,\n escaped: $28f1bf2594995773$var$isAnySideFullyClipped(offsets)\n }\n };\n }\n default:\n return {};\n }\n }\n };\n};\nfunction $28f1bf2594995773$var$getBoundingRect(rects) {\n const minX = (0, $93031e4206e8e991$export$96ec731ed4dcb222)(...rects.map((rect)=>rect.left));\n const minY = (0, $93031e4206e8e991$export$96ec731ed4dcb222)(...rects.map((rect)=>rect.top));\n const maxX = (0, $93031e4206e8e991$export$8960430cfd85939f)(...rects.map((rect)=>rect.right));\n const maxY = (0, $93031e4206e8e991$export$8960430cfd85939f)(...rects.map((rect)=>rect.bottom));\n return {\n x: minX,\n y: minY,\n width: maxX - minX,\n height: maxY - minY\n };\n}\nfunction $28f1bf2594995773$var$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) groups.push([\n rect\n ]);\n else groups[groups.length - 1].push(rect);\n prevRect = rect;\n }\n return groups.map((rect)=>(0, $93031e4206e8e991$export$ee05aea0aeecbad4)($28f1bf2594995773$var$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 */ const $28f1bf2594995773$export$18c8ad048e32c7d5 = function(options) {\n if (options === void 0) options = {};\n return {\n name: 'inline',\n options: options,\n async fn (state) {\n const { placement: placement, elements: elements, rects: rects, platform: platform, strategy: strategy } = 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 { padding: padding = 2, x: x, y: y } = (0, $93031e4206e8e991$export$fef61f332f2c0afc)(options, state);\n const nativeClientRects = Array.from(await (platform.getClientRects == null ? void 0 : platform.getClientRects(elements.reference)) || []);\n // No rects (e.g. a hidden or detached reference, or a collapsed range) —\n // keep the existing reference rect rather than resetting to an invalid\n // one with non-finite values.\n if (!nativeClientRects.length) return {};\n const clientRects = $28f1bf2594995773$var$getRectsByLine(nativeClientRects);\n const fallback = (0, $93031e4206e8e991$export$ee05aea0aeecbad4)($28f1bf2594995773$var$getBoundingRect(nativeClientRects));\n const paddingObject = (0, $93031e4206e8e991$export$598c291c29bc2e71)(padding);\n function getBoundingClientRect() {\n // There are two rects and they are disjoined.\n if (clientRects.length === 2 && (clientRects[0].left > clientRects[1].right || clientRects[1].left > clientRects[0].right) && x != null && y != null) // 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 // There are 2 or more connected rects.\n if (clientRects.length >= 2) {\n if ((0, $93031e4206e8e991$export$f28e8f882010718a)(placement) === 'y') {\n const firstRect = clientRects[0];\n const lastRect = clientRects[clientRects.length - 1];\n const isTop = (0, $93031e4206e8e991$export$3c915306cb7fc97a)(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 return (0, $93031e4206e8e991$export$ee05aea0aeecbad4)({\n x: left,\n y: top,\n width: right - left,\n height: bottom - top\n });\n }\n const isLeftSide = (0, $93031e4206e8e991$export$3c915306cb7fc97a)(placement) === 'left';\n const maxRight = (0, $93031e4206e8e991$export$8960430cfd85939f)(...clientRects.map((rect)=>rect.right));\n const minLeft = (0, $93031e4206e8e991$export$96ec731ed4dcb222)(...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 return (0, $93031e4206e8e991$export$ee05aea0aeecbad4)({\n x: minLeft,\n y: top,\n width: maxRight - minLeft,\n height: bottom - top\n });\n }\n return fallback;\n }\n const resetRects = await platform.getElementRects({\n reference: {\n getBoundingClientRect: getBoundingClientRect\n },\n floating: elements.floating,\n strategy: 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) return {\n reset: {\n rects: resetRects\n }\n };\n return {};\n }\n };\n};\nconst $28f1bf2594995773$var$originSides = /*#__PURE__*/ new Set([\n 'left',\n 'top'\n]);\n// For type backwards-compatibility, the `OffsetOptions` type was also\n// Derivable.\nasync function $28f1bf2594995773$var$convertValueToCoords(state, options) {\n const { placement: placement, platform: platform, elements: elements } = state;\n const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));\n const side = (0, $93031e4206e8e991$export$3c915306cb7fc97a)(placement);\n const alignment = (0, $93031e4206e8e991$export$f0989780f32bfcda)(placement);\n const isVertical = (0, $93031e4206e8e991$export$f28e8f882010718a)(placement) === 'y';\n const mainAxisMulti = $28f1bf2594995773$var$originSides.has(side) ? -1 : 1;\n const crossAxisMulti = rtl && isVertical ? -1 : 1;\n const rawValue = (0, $93031e4206e8e991$export$fef61f332f2c0afc)(options, state);\n // eslint-disable-next-line prefer-const\n let { mainAxis: mainAxis, crossAxis: crossAxis, alignmentAxis: alignmentAxis } = 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') crossAxis = alignment === 'end' ? alignmentAxis * -1 : alignmentAxis;\n return isVertical ? {\n x: crossAxis * crossAxisMulti,\n y: mainAxis * mainAxisMulti\n } : {\n x: mainAxis * mainAxisMulti,\n y: crossAxis * crossAxisMulti\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 */ const $28f1bf2594995773$export$cc800923e997bb8 = function(options) {\n if (options === void 0) options = 0;\n return {\n name: 'offset',\n options: options,\n async fn (state) {\n var _middlewareData$offse, _middlewareData$arrow;\n const { x: x, y: y, placement: placement, middlewareData: middlewareData } = state;\n const diffCoords = await $28f1bf2594995773$var$convertValueToCoords(state, options);\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) return {};\n return {\n x: x + diffCoords.x,\n y: y + diffCoords.y,\n data: {\n ...diffCoords,\n placement: placement\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 */ const $28f1bf2594995773$export$fba63a578e423eb = function(options) {\n if (options === void 0) options = {};\n return {\n name: 'shift',\n options: options,\n async fn (state) {\n const { x: x, y: y, placement: placement, platform: platform } = state;\n const { mainAxis: checkMainAxis = true, crossAxis: checkCrossAxis = false, limiter: limiter = {\n fn: (_ref)=>{\n let { x: x, y: y } = _ref;\n return {\n x: x,\n y: y\n };\n }\n }, ...detectOverflowOptions } = (0, $93031e4206e8e991$export$fef61f332f2c0afc)(options, state);\n const coords = {\n x: x,\n y: y\n };\n const overflow = await platform.detectOverflow(state, detectOverflowOptions);\n const crossAxis = (0, $93031e4206e8e991$export$f28e8f882010718a)(placement);\n const mainAxis = (0, $93031e4206e8e991$export$8a000a963141ac32)(crossAxis);\n let mainAxisCoord = coords[mainAxis];\n let crossAxisCoord = coords[crossAxis];\n const clampCoord = (axis, coord)=>(0, $93031e4206e8e991$export$7d15b64cf5a3a4c4)(coord + overflow[axis === 'y' ? 'top' : 'left'], coord, coord - overflow[axis === 'y' ? 'bottom' : 'right']);\n if (checkMainAxis) mainAxisCoord = clampCoord(mainAxis, mainAxisCoord);\n if (checkCrossAxis) crossAxisCoord = clampCoord(crossAxis, crossAxisCoord);\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 */ const $28f1bf2594995773$export$7bf07e38f3dc4b69 = function(options) {\n if (options === void 0) options = {};\n return {\n options: options,\n fn (state) {\n var _rawOffset$mainAxis, _rawOffset$crossAxis;\n const { x: x, y: y, placement: placement, rects: rects, middlewareData: middlewareData } = state;\n const { offset: offset = 0, mainAxis: checkMainAxis = true, crossAxis: checkCrossAxis = true } = (0, $93031e4206e8e991$export$fef61f332f2c0afc)(options, state);\n const coords = {\n x: x,\n y: y\n };\n const crossAxis = (0, $93031e4206e8e991$export$f28e8f882010718a)(placement);\n const mainAxis = (0, $93031e4206e8e991$export$8a000a963141ac32)(crossAxis);\n let mainAxisCoord = coords[mainAxis];\n let crossAxisCoord = coords[crossAxis];\n const rawOffset = (0, $93031e4206e8e991$export$fef61f332f2c0afc)(offset, state);\n const computedOffset = typeof rawOffset === 'number' ? {\n mainAxis: rawOffset,\n crossAxis: 0\n } : {\n mainAxis: (_rawOffset$mainAxis = rawOffset.mainAxis) != null ? _rawOffset$mainAxis : 0,\n crossAxis: (_rawOffset$crossAxis = rawOffset.crossAxis) != null ? _rawOffset$crossAxis : 0\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) mainAxisCoord = limitMin;\n else if (mainAxisCoord > limitMax) mainAxisCoord = limitMax;\n }\n if (checkCrossAxis) {\n var _middlewareData$offse, _middlewareData$offse2;\n const len = mainAxis === 'y' ? 'width' : 'height';\n const isOriginSide = $28f1bf2594995773$var$originSides.has((0, $93031e4206e8e991$export$3c915306cb7fc97a)(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) crossAxisCoord = limitMin;\n else if (crossAxisCoord > limitMax) crossAxisCoord = limitMax;\n }\n return {\n [mainAxis]: mainAxisCoord,\n [crossAxis]: crossAxisCoord\n };\n }\n };\n};\n// Method syntax keeps callback parameters bivariant, but expressing the\n// explicit `| undefined` required by `exactOptionalPropertyTypes` needs\n// property syntax, which is contravariant under `strictFunctionTypes`.\n// Extracting the function from a method position restores that bivariance so\n// consumers can still assign callbacks with narrower parameter types.\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 */ const $28f1bf2594995773$export$346677f925de839c = function(options) {\n if (options === void 0) options = {};\n return {\n name: 'size',\n options: options,\n async fn (state) {\n const { placement: placement, rects: rects, platform: platform, elements: elements } = state;\n const { apply: apply = ()=>{}, ...detectOverflowOptions } = (0, $93031e4206e8e991$export$fef61f332f2c0afc)(options, state);\n const overflow = await platform.detectOverflow(state, detectOverflowOptions);\n const side = (0, $93031e4206e8e991$export$3c915306cb7fc97a)(placement);\n const alignment = (0, $93031e4206e8e991$export$f0989780f32bfcda)(placement);\n const isYAxis = (0, $93031e4206e8e991$export$f28e8f882010718a)(placement) === 'y';\n const { width: width, height: height } = 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 = (0, $93031e4206e8e991$export$96ec731ed4dcb222)(height - overflow[heightSide], maximumClippingHeight);\n const overflowAvailableWidth = (0, $93031e4206e8e991$export$96ec731ed4dcb222)(width - overflow[widthSide], maximumClippingWidth);\n const shiftData = state.middlewareData.shift;\n const noShift = !shiftData;\n let availableHeight = overflowAvailableHeight;\n let availableWidth = overflowAvailableWidth;\n if (shiftData != null && shiftData.enabled.x) availableWidth = maximumClippingWidth;\n if (shiftData != null && shiftData.enabled.y) availableHeight = maximumClippingHeight;\n if (noShift && !alignment) {\n if (isYAxis) availableWidth = width - 2 * (0, $93031e4206e8e991$export$8960430cfd85939f)(overflow.left, overflow.right);\n else availableHeight = height - 2 * (0, $93031e4206e8e991$export$8960430cfd85939f)(overflow.top, overflow.bottom);\n }\n await apply({\n ...state,\n availableWidth: availableWidth,\n availableHeight: availableHeight\n });\n const nextDimensions = await platform.getDimensions(elements.floating);\n if (width !== nextDimensions.width || height !== nextDimensions.height) return {\n reset: {\n rects: true\n }\n };\n return {};\n }\n };\n};\n\n\n\nfunction $44e0f21d4eb6a5a0$var$hasWindow() {\n return typeof window !== 'undefined';\n}\nfunction $44e0f21d4eb6a5a0$export$651544f548703224(node) {\n if ($44e0f21d4eb6a5a0$export$8ee0fc9ee280b4ee(node)) return (node.nodeName || '').toLowerCase();\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 $44e0f21d4eb6a5a0$export$38b2d434cce3ea22(node) {\n var _node$ownerDocument;\n return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;\n}\nfunction $44e0f21d4eb6a5a0$export$e495491855dc5418(node) {\n var _ref;\n return (_ref = ($44e0f21d4eb6a5a0$export$8ee0fc9ee280b4ee(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;\n}\nfunction $44e0f21d4eb6a5a0$export$8ee0fc9ee280b4ee(value) {\n if (!$44e0f21d4eb6a5a0$var$hasWindow()) return false;\n return value instanceof Node || value instanceof $44e0f21d4eb6a5a0$export$38b2d434cce3ea22(value).Node;\n}\nfunction $44e0f21d4eb6a5a0$export$45a5e7f76e0caa8d(value) {\n if (!$44e0f21d4eb6a5a0$var$hasWindow()) return false;\n return value instanceof Element || value instanceof $44e0f21d4eb6a5a0$export$38b2d434cce3ea22(value).Element;\n}\nfunction $44e0f21d4eb6a5a0$export$1b3bfaa9684536aa(value) {\n if (!$44e0f21d4eb6a5a0$var$hasWindow()) return false;\n return value instanceof HTMLElement || value instanceof $44e0f21d4eb6a5a0$export$38b2d434cce3ea22(value).HTMLElement;\n}\nfunction $44e0f21d4eb6a5a0$export$af51f0f06c0f328a(value) {\n if (!$44e0f21d4eb6a5a0$var$hasWindow() || typeof ShadowRoot === 'undefined') return false;\n return value instanceof ShadowRoot || value instanceof $44e0f21d4eb6a5a0$export$38b2d434cce3ea22(value).ShadowRoot;\n}\nfunction $44e0f21d4eb6a5a0$export$989e911fa9af580a(element) {\n const { overflow: overflow, overflowX: overflowX, overflowY: overflowY, display: display } = $44e0f21d4eb6a5a0$export$3735103072e4a80(element);\n return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && display !== 'inline' && display !== 'contents';\n}\nfunction $44e0f21d4eb6a5a0$export$71535ffaa902797f(element) {\n return /^(table|td|th)$/.test($44e0f21d4eb6a5a0$export$651544f548703224(element));\n}\nfunction $44e0f21d4eb6a5a0$export$89e651af02346cd4(element) {\n try {\n if (element.matches(':popover-open')) return true;\n } catch (_e) {\n // no-op\n }\n try {\n return element.matches(':modal');\n } catch (_e) {\n return false;\n }\n}\nconst $44e0f21d4eb6a5a0$var$willChangeRe = /transform|translate|scale|rotate|perspective|filter/;\nconst $44e0f21d4eb6a5a0$var$containRe = /paint|layout|strict|content/;\nconst $44e0f21d4eb6a5a0$var$isNotNone = (value)=>!!value && value !== 'none';\nlet $44e0f21d4eb6a5a0$var$isWebKitValue;\nfunction $44e0f21d4eb6a5a0$export$d6c4e8150c35fed1(elementOrCss) {\n const css = $44e0f21d4eb6a5a0$export$45a5e7f76e0caa8d(elementOrCss) ? $44e0f21d4eb6a5a0$export$3735103072e4a80(elementOrCss) : elementOrCss;\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 $44e0f21d4eb6a5a0$var$isNotNone(css.transform) || $44e0f21d4eb6a5a0$var$isNotNone(css.translate) || $44e0f21d4eb6a5a0$var$isNotNone(css.scale) || $44e0f21d4eb6a5a0$var$isNotNone(css.rotate) || $44e0f21d4eb6a5a0$var$isNotNone(css.perspective) || !$44e0f21d4eb6a5a0$export$78551043582a6a98() && ($44e0f21d4eb6a5a0$var$isNotNone(css.backdropFilter) || $44e0f21d4eb6a5a0$var$isNotNone(css.filter)) || $44e0f21d4eb6a5a0$var$willChangeRe.test(css.willChange || '') || $44e0f21d4eb6a5a0$var$containRe.test(css.contain || '');\n}\nfunction $44e0f21d4eb6a5a0$export$940d8225183e1404(element) {\n let currentNode = $44e0f21d4eb6a5a0$export$4e12058fc4d51d56(element);\n while($44e0f21d4eb6a5a0$export$1b3bfaa9684536aa(currentNode) && !$44e0f21d4eb6a5a0$export$d1162fb0b6d4cd51(currentNode)){\n if ($44e0f21d4eb6a5a0$export$d6c4e8150c35fed1(currentNode)) return currentNode;\n else if ($44e0f21d4eb6a5a0$export$89e651af02346cd4(currentNode)) return null;\n currentNode = $44e0f21d4eb6a5a0$export$4e12058fc4d51d56(currentNode);\n }\n return null;\n}\nfunction $44e0f21d4eb6a5a0$export$78551043582a6a98() {\n if ($44e0f21d4eb6a5a0$var$isWebKitValue == null) $44e0f21d4eb6a5a0$var$isWebKitValue = typeof CSS !== 'undefined' && CSS.supports && CSS.supports('-webkit-backdrop-filter', 'none');\n return $44e0f21d4eb6a5a0$var$isWebKitValue;\n}\nfunction $44e0f21d4eb6a5a0$export$d1162fb0b6d4cd51(node) {\n return /^(html|body|#document)$/.test($44e0f21d4eb6a5a0$export$651544f548703224(node));\n}\nfunction $44e0f21d4eb6a5a0$export$3735103072e4a80(element) {\n return $44e0f21d4eb6a5a0$export$38b2d434cce3ea22(element).getComputedStyle(element);\n}\nfunction $44e0f21d4eb6a5a0$export$dc8fc79fa2800137(element) {\n if ($44e0f21d4eb6a5a0$export$45a5e7f76e0caa8d(element)) return {\n scrollLeft: element.scrollLeft,\n scrollTop: element.scrollTop\n };\n return {\n scrollLeft: element.scrollX,\n scrollTop: element.scrollY\n };\n}\nfunction $44e0f21d4eb6a5a0$export$4e12058fc4d51d56(node) {\n if ($44e0f21d4eb6a5a0$export$651544f548703224(node) === 'html') return node;\n const result = // Step into the shadow DOM of the parent of a slotted node.\n node.assignedSlot || // DOM Element detected.\n node.parentNode || // ShadowRoot detected.\n $44e0f21d4eb6a5a0$export$af51f0f06c0f328a(node) && node.host || // Fallback.\n $44e0f21d4eb6a5a0$export$e495491855dc5418(node);\n return $44e0f21d4eb6a5a0$export$af51f0f06c0f328a(result) ? result.host : result;\n}\nfunction $44e0f21d4eb6a5a0$export$7cd01a57c8ca906c(node) {\n const parentNode = $44e0f21d4eb6a5a0$export$4e12058fc4d51d56(node);\n if ($44e0f21d4eb6a5a0$export$d1162fb0b6d4cd51(parentNode)) return (node.ownerDocument || node).body;\n if ($44e0f21d4eb6a5a0$export$1b3bfaa9684536aa(parentNode) && $44e0f21d4eb6a5a0$export$989e911fa9af580a(parentNode)) return parentNode;\n return $44e0f21d4eb6a5a0$export$7cd01a57c8ca906c(parentNode);\n}\nfunction $44e0f21d4eb6a5a0$export$3b57c1601291186b(node, list, traverseIframes) {\n var _node$ownerDocument2;\n if (list === void 0) list = [];\n if (traverseIframes === void 0) traverseIframes = true;\n const scrollableAncestor = $44e0f21d4eb6a5a0$export$7cd01a57c8ca906c(node);\n const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);\n const win = $44e0f21d4eb6a5a0$export$38b2d434cce3ea22(scrollableAncestor);\n if (isBody) {\n const frameElement = $44e0f21d4eb6a5a0$export$7bf1f8740e3e34af(win);\n return list.concat(win, win.visualViewport || [], $44e0f21d4eb6a5a0$export$989e911fa9af580a(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? $44e0f21d4eb6a5a0$export$3b57c1601291186b(frameElement) : []);\n } else return list.concat(scrollableAncestor, $44e0f21d4eb6a5a0$export$3b57c1601291186b(scrollableAncestor, [], traverseIframes));\n}\nfunction $44e0f21d4eb6a5a0$export$7bf1f8740e3e34af(win) {\n return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;\n}\n\n\nfunction $729e420fd9c85e8f$var$getCssDimensions(element) {\n const css = (0, $44e0f21d4eb6a5a0$export$3735103072e4a80)(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 = (0, $44e0f21d4eb6a5a0$export$1b3bfaa9684536aa)(element);\n const offsetWidth = hasOffset ? element.offsetWidth : width;\n const offsetHeight = hasOffset ? element.offsetHeight : height;\n const shouldFallback = (0, $93031e4206e8e991$export$2077e0241d6afd3c)(width) !== offsetWidth || (0, $93031e4206e8e991$export$2077e0241d6afd3c)(height) !== offsetHeight;\n if (shouldFallback) {\n width = offsetWidth;\n height = offsetHeight;\n }\n return {\n width: width,\n height: height,\n $: shouldFallback\n };\n}\nfunction $729e420fd9c85e8f$var$unwrapElement(element) {\n return !(0, $44e0f21d4eb6a5a0$export$45a5e7f76e0caa8d)(element) ? element.contextElement : element;\n}\nfunction $729e420fd9c85e8f$var$getScale(element) {\n const domElement = $729e420fd9c85e8f$var$unwrapElement(element);\n if (!(0, $44e0f21d4eb6a5a0$export$1b3bfaa9684536aa)(domElement)) return (0, $93031e4206e8e991$export$a397704b5e280835)(1);\n const rect = domElement.getBoundingClientRect();\n const { width: width, height: height, $: $ } = $729e420fd9c85e8f$var$getCssDimensions(domElement);\n let x = ($ ? (0, $93031e4206e8e991$export$2077e0241d6afd3c)(rect.width) : rect.width) / width;\n let y = ($ ? (0, $93031e4206e8e991$export$2077e0241d6afd3c)(rect.height) : rect.height) / height;\n // 0, NaN, or Infinity should always fallback to 1.\n if (!x || !Number.isFinite(x)) x = 1;\n if (!y || !Number.isFinite(y)) y = 1;\n return {\n x: x,\n y: y\n };\n}\nconst $729e420fd9c85e8f$var$noOffsets = /*#__PURE__*/ (0, $93031e4206e8e991$export$a397704b5e280835)(0);\nfunction $729e420fd9c85e8f$var$getVisualOffsets(element) {\n const win = (0, $44e0f21d4eb6a5a0$export$38b2d434cce3ea22)(element);\n if (!(0, $44e0f21d4eb6a5a0$export$78551043582a6a98)() || !win.visualViewport) return $729e420fd9c85e8f$var$noOffsets;\n return {\n x: win.visualViewport.offsetLeft,\n y: win.visualViewport.offsetTop\n };\n}\nfunction $729e420fd9c85e8f$var$shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {\n if (isFixed === void 0) isFixed = false;\n return !!floatingOffsetParent && isFixed && floatingOffsetParent === (0, $44e0f21d4eb6a5a0$export$38b2d434cce3ea22)(element);\n}\nfunction $729e420fd9c85e8f$var$getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {\n if (includeScale === void 0) includeScale = false;\n if (isFixedStrategy === void 0) isFixedStrategy = false;\n const clientRect = element.getBoundingClientRect();\n const domElement = $729e420fd9c85e8f$var$unwrapElement(element);\n let scale = (0, $93031e4206e8e991$export$a397704b5e280835)(1);\n if (includeScale) {\n if (offsetParent) {\n if ((0, $44e0f21d4eb6a5a0$export$45a5e7f76e0caa8d)(offsetParent)) scale = $729e420fd9c85e8f$var$getScale(offsetParent);\n } else scale = $729e420fd9c85e8f$var$getScale(element);\n }\n const visualOffsets = $729e420fd9c85e8f$var$shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? $729e420fd9c85e8f$var$getVisualOffsets(domElement) : (0, $93031e4206e8e991$export$a397704b5e280835)(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 && offsetParent) {\n const win = (0, $44e0f21d4eb6a5a0$export$38b2d434cce3ea22)(domElement);\n const offsetWin = (0, $44e0f21d4eb6a5a0$export$45a5e7f76e0caa8d)(offsetParent) ? (0, $44e0f21d4eb6a5a0$export$38b2d434cce3ea22)(offsetParent) : offsetParent;\n let currentWin = win;\n let currentIFrame = (0, $44e0f21d4eb6a5a0$export$7bf1f8740e3e34af)(currentWin);\n while(currentIFrame && offsetWin !== currentWin){\n const iframeScale = $729e420fd9c85e8f$var$getScale(currentIFrame);\n const iframeRect = currentIFrame.getBoundingClientRect();\n const css = (0, $44e0f21d4eb6a5a0$export$3735103072e4a80)(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 = (0, $44e0f21d4eb6a5a0$export$38b2d434cce3ea22)(currentIFrame);\n currentIFrame = (0, $44e0f21d4eb6a5a0$export$7bf1f8740e3e34af)(currentWin);\n }\n }\n return (0, $93031e4206e8e991$export$ee05aea0aeecbad4)({\n width: width,\n height: height,\n x: x,\n y: y\n });\n}\n// If <html> has a CSS width greater than the viewport, then this will be\n// incorrect for RTL.\nfunction $729e420fd9c85e8f$var$getWindowScrollBarX(element, rect) {\n const leftScroll = (0, $44e0f21d4eb6a5a0$export$dc8fc79fa2800137)(element).scrollLeft;\n if (!rect) return $729e420fd9c85e8f$var$getBoundingClientRect((0, $44e0f21d4eb6a5a0$export$e495491855dc5418)(element)).left + leftScroll;\n return rect.left + leftScroll;\n}\nfunction $729e420fd9c85e8f$var$getHTMLOffset(documentElement, scroll) {\n const htmlRect = documentElement.getBoundingClientRect();\n const x = htmlRect.left + scroll.scrollLeft - $729e420fd9c85e8f$var$getWindowScrollBarX(documentElement, htmlRect);\n const y = htmlRect.top + scroll.scrollTop;\n return {\n x: x,\n y: y\n };\n}\nfunction $729e420fd9c85e8f$var$convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {\n let { elements: elements, rect: rect, offsetParent: offsetParent, strategy: strategy } = _ref;\n const isFixed = strategy === 'fixed';\n const documentElement = (0, $44e0f21d4eb6a5a0$export$e495491855dc5418)(offsetParent);\n const topLayer = elements ? (0, $44e0f21d4eb6a5a0$export$89e651af02346cd4)(elements.floating) : false;\n if (offsetParent === documentElement || topLayer && isFixed) return rect;\n let scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n let scale = (0, $93031e4206e8e991$export$a397704b5e280835)(1);\n const offsets = (0, $93031e4206e8e991$export$a397704b5e280835)(0);\n const isOffsetParentAnElement = (0, $44e0f21d4eb6a5a0$export$1b3bfaa9684536aa)(offsetParent);\n if (isOffsetParentAnElement || !isFixed) {\n if ((0, $44e0f21d4eb6a5a0$export$651544f548703224)(offsetParent) !== 'body' || (0, $44e0f21d4eb6a5a0$export$989e911fa9af580a)(documentElement)) scroll = (0, $44e0f21d4eb6a5a0$export$dc8fc79fa2800137)(offsetParent);\n if (isOffsetParentAnElement) {\n const offsetRect = $729e420fd9c85e8f$var$getBoundingClientRect(offsetParent);\n scale = $729e420fd9c85e8f$var$getScale(offsetParent);\n offsets.x = offsetRect.x + offsetParent.clientLeft;\n offsets.y = offsetRect.y + offsetParent.clientTop;\n }\n }\n const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? $729e420fd9c85e8f$var$getHTMLOffset(documentElement, scroll) : (0, $93031e4206e8e991$export$a397704b5e280835)(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}\nfunction $729e420fd9c85e8f$var$getClientRects(element) {\n return element.getClientRects ? Array.from(element.getClientRects()) : [];\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 $729e420fd9c85e8f$var$getDocumentRect(html) {\n const scroll = (0, $44e0f21d4eb6a5a0$export$dc8fc79fa2800137)(html);\n const body = html.ownerDocument.body;\n const width = (0, $93031e4206e8e991$export$8960430cfd85939f)(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);\n const height = (0, $93031e4206e8e991$export$8960430cfd85939f)(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);\n let x = -scroll.scrollLeft + $729e420fd9c85e8f$var$getWindowScrollBarX(html);\n const y = -scroll.scrollTop;\n if ((0, $44e0f21d4eb6a5a0$export$3735103072e4a80)(body).direction === 'rtl') x += (0, $93031e4206e8e991$export$8960430cfd85939f)(html.clientWidth, body.clientWidth) - width;\n return {\n width: width,\n height: height,\n x: x,\n y: y\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 $729e420fd9c85e8f$var$SCROLLBAR_MAX = 25;\nfunction $729e420fd9c85e8f$var$getViewportRect(element, strategy, rootBoundary) {\n if (rootBoundary === void 0) rootBoundary = 'viewport';\n const isLayoutViewport = rootBoundary === 'layoutViewport';\n const win = (0, $44e0f21d4eb6a5a0$export$38b2d434cce3ea22)(element);\n const html = (0, $44e0f21d4eb6a5a0$export$e495491855dc5418)(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 // Client coordinates are relative to the layout viewport, except in\n // WebKit with an `absolute` strategy, where they are relative to the\n // visual viewport.\n const layoutRelativeClientCoords = !(0, $44e0f21d4eb6a5a0$export$78551043582a6a98)() || strategy === 'fixed';\n if (isLayoutViewport) {\n if (!layoutRelativeClientCoords) {\n x = -visualViewport.offsetLeft;\n y = -visualViewport.offsetTop;\n }\n } else {\n width = visualViewport.width;\n height = visualViewport.height;\n if (layoutRelativeClientCoords) {\n x = visualViewport.offsetLeft;\n y = visualViewport.offsetTop;\n }\n }\n }\n const windowScrollbarX = $729e420fd9c85e8f$var$getWindowScrollBarX(html);\n // `scrollbar-gutter: stable` on the <html> reserves gutter space that shrinks\n // the visual width but isn't reflected in `html.clientWidth`, so subtract it.\n // Only the inline-end (right) gutter can hold the scrollbar; `both-edges` also\n // reserves an empty inline-start gutter that clips nothing, so exclude just\n // the one scrollbar-side gutter — halve the measured (two-gutter) total. A\n // left-side scrollbar (`windowScrollbarX > 0`) is already handled by\n // `getHTMLOffset`/`visualViewport.width`; skip it here.\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 reservedWidth = Math.abs(html.clientWidth - body.clientWidth - bodyMarginInline);\n const gutter = getComputedStyle(html).scrollbarGutter === 'stable both-edges' ? reservedWidth / 2 : reservedWidth;\n if (gutter <= $729e420fd9c85e8f$var$SCROLLBAR_MAX) width -= gutter;\n }\n return {\n width: width,\n height: height,\n x: x,\n y: y\n };\n}\n// Returns the inner client rect, subtracting scrollbars if present.\nfunction $729e420fd9c85e8f$var$getInnerBoundingClientRect(element, strategy) {\n const clientRect = $729e420fd9c85e8f$var$getBoundingClientRect(element, true, strategy === 'fixed');\n const top = clientRect.top + element.clientTop;\n const left = clientRect.left + element.clientLeft;\n const scale = $729e420fd9c85e8f$var$getScale(element);\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: width,\n height: height,\n x: x,\n y: y\n };\n}\nfunction $729e420fd9c85e8f$var$getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {\n let rect;\n if (clippingAncestor === 'viewport' || clippingAncestor === 'layoutViewport') rect = $729e420fd9c85e8f$var$getViewportRect(element, strategy, clippingAncestor);\n else if (clippingAncestor === 'document') rect = $729e420fd9c85e8f$var$getDocumentRect((0, $44e0f21d4eb6a5a0$export$e495491855dc5418)(element));\n else if ((0, $44e0f21d4eb6a5a0$export$45a5e7f76e0caa8d)(clippingAncestor)) rect = $729e420fd9c85e8f$var$getInnerBoundingClientRect(clippingAncestor, strategy);\n else {\n const visualOffsets = $729e420fd9c85e8f$var$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 (0, $93031e4206e8e991$export$ee05aea0aeecbad4)(rect);\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 $729e420fd9c85e8f$var$getClippingElementAncestors(element, cache) {\n const cachedResult = cache.get(element);\n if (cachedResult) return cachedResult;\n let result = (0, $44e0f21d4eb6a5a0$export$3b57c1601291186b)(element, [], false).filter((el)=>(0, $44e0f21d4eb6a5a0$export$45a5e7f76e0caa8d)(el) && (0, $44e0f21d4eb6a5a0$export$651544f548703224)(el) !== 'body');\n let lastKeptComputedStyle = null;\n const elementIsFixed = (0, $44e0f21d4eb6a5a0$export$3735103072e4a80)(element).position === 'fixed';\n let currentNode = elementIsFixed ? (0, $44e0f21d4eb6a5a0$export$4e12058fc4d51d56)(element) : element;\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n while((0, $44e0f21d4eb6a5a0$export$45a5e7f76e0caa8d)(currentNode) && !(0, $44e0f21d4eb6a5a0$export$d1162fb0b6d4cd51)(currentNode)){\n const computedStyle = (0, $44e0f21d4eb6a5a0$export$3735103072e4a80)(currentNode);\n const currentNodeIsContaining = (0, $44e0f21d4eb6a5a0$export$d6c4e8150c35fed1)(currentNode);\n // Position of the containing block chain below the current node. A fixed\n // element whose containing block hasn't been found yet is a fixed chain.\n const lastPosition = lastKeptComputedStyle ? lastKeptComputedStyle.position : elementIsFixed ? 'fixed' : '';\n // A non-containing ancestor does not clip the element when the chain\n // below it escapes it: a fixed chain escapes all ancestors up to the\n // next containing block, an absolute chain escapes static ancestors.\n const shouldDropCurrentNode = !currentNodeIsContaining && (lastPosition === 'fixed' || lastPosition === 'absolute' && computedStyle.position === 'static');\n if (shouldDropCurrentNode) // Drop non-containing blocks.\n result = result.filter((ancestor)=>ancestor !== currentNode);\n else // The kept node carries the chain position for the next iteration.\n lastKeptComputedStyle = computedStyle;\n currentNode = (0, $44e0f21d4eb6a5a0$export$4e12058fc4d51d56)(currentNode);\n }\n cache.set(element, result);\n return result;\n}\n// Gets the maximum area that the element is visible in due to any number of\n// clipping ancestors.\nfunction $729e420fd9c85e8f$var$getClippingRect(_ref) {\n let { element: element, boundary: boundary, rootBoundary: rootBoundary, strategy: strategy } = _ref;\n const elementClippingAncestors = boundary === 'clippingAncestors' ? (0, $44e0f21d4eb6a5a0$export$89e651af02346cd4)(element) ? [] : $729e420fd9c85e8f$var$getClippingElementAncestors(element, this._c) : [].concat(boundary);\n const clippingAncestors = [\n ...elementClippingAncestors,\n rootBoundary\n ];\n const firstRect = $729e420fd9c85e8f$var$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 = $729e420fd9c85e8f$var$getClientRectFromClippingAncestor(element, clippingAncestors[i], strategy);\n top = (0, $93031e4206e8e991$export$8960430cfd85939f)(rect.top, top);\n right = (0, $93031e4206e8e991$export$96ec731ed4dcb222)(rect.right, right);\n bottom = (0, $93031e4206e8e991$export$96ec731ed4dcb222)(rect.bottom, bottom);\n left = (0, $93031e4206e8e991$export$8960430cfd85939f)(rect.left, left);\n }\n return {\n width: right - left,\n height: bottom - top,\n x: left,\n y: top\n };\n}\nfunction $729e420fd9c85e8f$var$getDimensions(element) {\n const { width: width, height: height } = $729e420fd9c85e8f$var$getCssDimensions(element);\n return {\n width: width,\n height: height\n };\n}\nfunction $729e420fd9c85e8f$var$getRectRelativeToOffsetParent(element, offsetParent, strategy) {\n const isOffsetParentAnElement = (0, $44e0f21d4eb6a5a0$export$1b3bfaa9684536aa)(offsetParent);\n const documentElement = (0, $44e0f21d4eb6a5a0$export$e495491855dc5418)(offsetParent);\n const isFixed = strategy === 'fixed';\n const rect = $729e420fd9c85e8f$var$getBoundingClientRect(element, true, isFixed, offsetParent);\n let scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n const offsets = (0, $93031e4206e8e991$export$a397704b5e280835)(0);\n if (isOffsetParentAnElement || !isFixed) {\n if ((0, $44e0f21d4eb6a5a0$export$651544f548703224)(offsetParent) !== 'body' || (0, $44e0f21d4eb6a5a0$export$989e911fa9af580a)(documentElement)) scroll = (0, $44e0f21d4eb6a5a0$export$dc8fc79fa2800137)(offsetParent);\n if (isOffsetParentAnElement) {\n const offsetRect = $729e420fd9c85e8f$var$getBoundingClientRect(offsetParent, true, isFixed, offsetParent);\n offsets.x = offsetRect.x + offsetParent.clientLeft;\n offsets.y = offsetRect.y + offsetParent.clientTop;\n }\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 if (!isOffsetParentAnElement && documentElement) offsets.x = $729e420fd9c85e8f$var$getWindowScrollBarX(documentElement);\n const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? $729e420fd9c85e8f$var$getHTMLOffset(documentElement, scroll) : (0, $93031e4206e8e991$export$a397704b5e280835)(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: x,\n y: y,\n width: rect.width,\n height: rect.height\n };\n}\nfunction $729e420fd9c85e8f$var$isStaticPositioned(element) {\n return (0, $44e0f21d4eb6a5a0$export$3735103072e4a80)(element).position === 'static';\n}\nfunction $729e420fd9c85e8f$var$getTrueOffsetParent(element, polyfill) {\n if (!(0, $44e0f21d4eb6a5a0$export$1b3bfaa9684536aa)(element) || (0, $44e0f21d4eb6a5a0$export$3735103072e4a80)(element).position === 'fixed') return null;\n if (polyfill) return polyfill(element);\n let rawOffsetParent = element.offsetParent;\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 ((0, $44e0f21d4eb6a5a0$export$e495491855dc5418)(element) === rawOffsetParent) rawOffsetParent = rawOffsetParent.ownerDocument.body;\n return rawOffsetParent;\n}\n// Gets the closest ancestor positioned element. Handles some edge cases,\n// such as table ancestors and cross browser bugs.\nfunction $729e420fd9c85e8f$var$getOffsetParent(element, polyfill) {\n const win = (0, $44e0f21d4eb6a5a0$export$38b2d434cce3ea22)(element);\n if ((0, $44e0f21d4eb6a5a0$export$89e651af02346cd4)(element)) return win;\n if (!(0, $44e0f21d4eb6a5a0$export$1b3bfaa9684536aa)(element)) {\n let svgOffsetParent = (0, $44e0f21d4eb6a5a0$export$4e12058fc4d51d56)(element);\n while(svgOffsetParent && !(0, $44e0f21d4eb6a5a0$export$d1162fb0b6d4cd51)(svgOffsetParent)){\n if ((0, $44e0f21d4eb6a5a0$export$45a5e7f76e0caa8d)(svgOffsetParent) && !$729e420fd9c85e8f$var$isStaticPositioned(svgOffsetParent)) return svgOffsetParent;\n svgOffsetParent = (0, $44e0f21d4eb6a5a0$export$4e12058fc4d51d56)(svgOffsetParent);\n }\n return win;\n }\n let offsetParent = $729e420fd9c85e8f$var$getTrueOffsetParent(element, polyfill);\n while(offsetParent && (0, $44e0f21d4eb6a5a0$export$71535ffaa902797f)(offsetParent) && $729e420fd9c85e8f$var$isStaticPositioned(offsetParent))offsetParent = $729e420fd9c85e8f$var$getTrueOffsetParent(offsetParent, polyfill);\n if (offsetParent && (0, $44e0f21d4eb6a5a0$export$d1162fb0b6d4cd51)(offsetParent) && $729e420fd9c85e8f$var$isStaticPositioned(offsetParent) && !(0, $44e0f21d4eb6a5a0$export$d6c4e8150c35fed1)(offsetParent)) return win;\n return offsetParent || (0, $44e0f21d4eb6a5a0$export$940d8225183e1404)(element) || win;\n}\nconst $729e420fd9c85e8f$var$getElementRects = async function(data) {\n const getOffsetParentFn = this.getOffsetParent || $729e420fd9c85e8f$var$getOffsetParent;\n const getDimensionsFn = this.getDimensions;\n const floatingDimensions = await getDimensionsFn(data.floating);\n return {\n reference: $729e420fd9c85e8f$var$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};\nfunction $729e420fd9c85e8f$var$isRTL(element) {\n return (0, $44e0f21d4eb6a5a0$export$3735103072e4a80)(element).direction === 'rtl';\n}\nconst $729e420fd9c85e8f$export$722a64dea1b767dc = {\n convertOffsetParentRelativeRectToViewportRelativeRect: $729e420fd9c85e8f$var$convertOffsetParentRelativeRectToViewportRelativeRect,\n getDocumentElement: $44e0f21d4eb6a5a0$export$e495491855dc5418,\n getClippingRect: $729e420fd9c85e8f$var$getClippingRect,\n getOffsetParent: $729e420fd9c85e8f$var$getOffsetParent,\n getElementRects: $729e420fd9c85e8f$var$getElementRects,\n getClientRects: $729e420fd9c85e8f$var$getClientRects,\n getDimensions: $729e420fd9c85e8f$var$getDimensions,\n getScale: $729e420fd9c85e8f$var$getScale,\n isElement: $44e0f21d4eb6a5a0$export$45a5e7f76e0caa8d,\n isRTL: $729e420fd9c85e8f$var$isRTL\n};\nfunction $729e420fd9c85e8f$var$rectsAreEqual(a, b) {\n return a.x === b.x && a.y === b.y && a.width === b.width && a.height === b.height;\n}\n// https://samthor.au/2021/observing-dom/\nfunction $729e420fd9c85e8f$var$observeMove(element, onMove, ancestorResize) {\n let io = null;\n let timeoutId;\n const root = (0, $44e0f21d4eb6a5a0$export$e495491855dc5418)(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) skip = false;\n if (threshold === void 0) threshold = 1;\n cleanup();\n const elementRectForRootMargin = element.getBoundingClientRect();\n const { left: left, top: top, width: width, height: height } = elementRectForRootMargin;\n if (!skip) onMove();\n if (!width || !height) return;\n const insetTop = (0, $93031e4206e8e991$export$a3fe094919f356fd)(top);\n const insetRight = (0, $93031e4206e8e991$export$a3fe094919f356fd)(root.clientWidth - (left + width));\n const insetBottom = (0, $93031e4206e8e991$export$a3fe094919f356fd)(root.clientHeight - (top + height));\n const insetLeft = (0, $93031e4206e8e991$export$a3fe094919f356fd)(left);\n const rootMargin = -insetTop + \"px \" + -insetRight + \"px \" + -insetBottom + \"px \" + -insetLeft + \"px\";\n const options = {\n rootMargin: rootMargin,\n threshold: (0, $93031e4206e8e991$export$8960430cfd85939f)(0, (0, $93031e4206e8e991$export$96ec731ed4dcb222)(1, threshold)) || 1\n };\n let isFirstUpdate = true;\n function handleObserve(entries) {\n const ratio = entries[0].intersectionRatio;\n // The entry is a snapshot, so the reference may have moved since the\n // intersection was computed (under performance constraints, or between\n // consecutive frames of a multi-frame layout shift). The reported ratio\n // and the observed area are stale in that case and cannot be trusted to\n // detect subsequent movement, so refresh regardless of the ratio.\n if (!$729e420fd9c85e8f$var$rectsAreEqual(elementRectForRootMargin, element.getBoundingClientRect())) return refresh();\n if (ratio !== threshold) {\n if (!isFirstUpdate) return refresh();\n if (!ratio) // If the reference is clipped in place, the ratio is 0. Throttle\n // the refresh to prevent an infinite loop of updates.\n timeoutId = setTimeout(()=>{\n refresh(false, 1e-7);\n }, 1000);\n else refresh(false, ratio);\n }\n isFirstUpdate = false;\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 const win = (0, $44e0f21d4eb6a5a0$export$38b2d434cce3ea22)(element);\n // The window is a resize ancestor, so when `ancestorResize` is enabled its\n // listener already runs the update on resize. Here we only need to rebuild\n // the `IntersectionObserver` for the new root size, skipping a redundant\n // update. When `ancestorResize` is disabled, this becomes the sole update.\n const handleResize = ()=>refresh(ancestorResize);\n win.addEventListener('resize', handleResize);\n refresh(true);\n return ()=>{\n win.removeEventListener('resize', handleResize);\n 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 */ function $729e420fd9c85e8f$export$deee3a793edee05f(reference, floating, update, options) {\n if (options === void 0) options = {};\n const { ancestorScroll: ancestorScroll = true, ancestorResize: ancestorResize = true, elementResize: elementResize = typeof ResizeObserver === 'function', layoutShift: layoutShift = typeof IntersectionObserver === 'function', animationFrame: animationFrame = false } = options;\n const referenceEl = $729e420fd9c85e8f$var$unwrapElement(reference);\n const ancestors = ancestorScroll || ancestorResize ? [\n ...referenceEl ? (0, $44e0f21d4eb6a5a0$export$3b57c1601291186b)(referenceEl) : [],\n ...floating ? (0, $44e0f21d4eb6a5a0$export$3b57c1601291186b)(floating) : []\n ] : [];\n ancestors.forEach((ancestor)=>{\n ancestorScroll && ancestor.addEventListener('scroll', update);\n ancestorResize && ancestor.addEventListener('resize', update);\n });\n const cleanupIo = referenceEl && layoutShift ? $729e420fd9c85e8f$var$observeMove(referenceEl, update, ancestorResize) : 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) resizeObserver.observe(referenceEl);\n if (floating) resizeObserver.observe(floating);\n }\n let frameId;\n let prevRefRect = animationFrame ? $729e420fd9c85e8f$var$getBoundingClientRect(reference) : null;\n if (animationFrame) frameLoop();\n function frameLoop() {\n const nextRefRect = $729e420fd9c85e8f$var$getBoundingClientRect(reference);\n if (prevRefRect && !$729e420fd9c85e8f$var$rectsAreEqual(prevRefRect, nextRefRect)) update();\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) cancelAnimationFrame(frameId);\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 */ const $729e420fd9c85e8f$export$37b6bde19b108ecc = (0, $28f1bf2594995773$export$37b6bde19b108ecc);\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 */ const $729e420fd9c85e8f$export$cc800923e997bb8 = (0, $28f1bf2594995773$export$cc800923e997bb8);\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 */ const $729e420fd9c85e8f$export$91fb6ecbd551914 = (0, $28f1bf2594995773$export$91fb6ecbd551914);\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 */ const $729e420fd9c85e8f$export$fba63a578e423eb = (0, $28f1bf2594995773$export$fba63a578e423eb);\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 */ const $729e420fd9c85e8f$export$8a83211c878a3f1f = (0, $28f1bf2594995773$export$8a83211c878a3f1f);\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 */ const $729e420fd9c85e8f$export$346677f925de839c = (0, $28f1bf2594995773$export$346677f925de839c);\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 */ const $729e420fd9c85e8f$export$fe8985bb6374093c = (0, $28f1bf2594995773$export$fe8985bb6374093c);\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 */ const $729e420fd9c85e8f$export$f2120bbfa5450bd2 = (0, $28f1bf2594995773$export$f2120bbfa5450bd2);\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 */ const $729e420fd9c85e8f$export$18c8ad048e32c7d5 = (0, $28f1bf2594995773$export$18c8ad048e32c7d5);\n/**\n * Built-in `limiter` that will stop `shift()` at a certain point.\n */ const $729e420fd9c85e8f$export$7bf07e38f3dc4b69 = (0, $28f1bf2594995773$export$7bf07e38f3dc4b69);\n/**\n * Computes the `x` and `y` coordinates that will place the floating element\n * next to a given reference element.\n */ const $729e420fd9c85e8f$export$48a53dcb22e581d0 = (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 = options != null ? options : {};\n const platformWithCache = {\n ...$729e420fd9c85e8f$export$722a64dea1b767dc,\n ...mergedOptions.platform,\n _c: cache\n };\n return (0, $28f1bf2594995773$export$48a53dcb22e581d0)(reference, floating, {\n ...mergedOptions,\n platform: platformWithCache\n });\n};\n\n\n\nclass $4454c65d0a913843$export$2e2bcd8739ae039 extends (0, $27d274cf1203127c$export$bd0bf19f25da8474) {\n static values = {\n trigger: {\n type: String,\n default: \"click\"\n },\n position: {\n type: String,\n default: \"auto\"\n },\n showDelay: {\n type: Number,\n default: 0\n },\n hideDelay: {\n type: Number,\n default: 100\n }\n };\n static targets = [\n \"trigger\",\n \"content\"\n ];\n connect() {\n this.boundShow = this.show.bind(this);\n this.boundHide = this.hide.bind(this);\n this.boundDelayedHide = this.delayedHide.bind(this);\n this.boundUpdatePosition = this.updatePosition.bind(this);\n this.boundOnNativeToggle = this.onNativeToggle.bind(this);\n this.hideTimeout = null;\n // Set up trigger based on type\n if (this.triggerValue === \"hover\") this.setupHoverTrigger();\n else this.setupClickTrigger();\n // Sync data-state when the native popover API light-dismisses\n if (this.hasContentTarget) this.contentTarget.addEventListener(\"toggle\", this.boundOnNativeToggle);\n }\n disconnect() {\n this.teardownTrigger();\n this.teardownPositioning();\n this.cancelShowTimeout();\n if (this.hideTimeout) clearTimeout(this.hideTimeout);\n if (this.hasContentTarget) this.contentTarget.removeEventListener(\"toggle\", this.boundOnNativeToggle);\n }\n onNativeToggle(event) {\n if (event.newState === \"closed\" && this.element.getAttribute(\"data-state\") === \"open\") {\n this.element.setAttribute(\"data-state\", \"closed\");\n this.contentTarget.removeAttribute(\"data-positioned\");\n this.teardownPositioning();\n }\n }\n // Actions\n async show() {\n if (this.hideTimeout) {\n clearTimeout(this.hideTimeout);\n this.hideTimeout = null;\n }\n if (this.element.getAttribute(\"data-state\") === \"open\") return;\n if (this.hasContentTarget) try {\n // Show popover invisibly first (CSS gate hides it until data-positioned is set)\n this.contentTarget.removeAttribute(\"data-positioned\");\n this.contentTarget.showPopover();\n this.element.setAttribute(\"data-state\", \"open\");\n // Now calculate position with the element visible and measurable\n const { x: x, y: y, placement: placement } = await this.calculatePosition();\n this.contentTarget.style.left = `${x}px`;\n this.contentTarget.style.top = `${y}px`;\n this.contentTarget.dataset.placement = placement;\n // Reveal at the correct position\n this.contentTarget.setAttribute(\"data-positioned\", \"true\");\n this.setupPositioning();\n this.element.dispatchEvent(new CustomEvent(\"orbital:popover:shown\", {\n bubbles: true,\n detail: {\n popover: this.contentTarget\n }\n }));\n } catch (e) {\n // Popover API not supported, fallback gracefully\n console.warn(\"Popover API not supported:\", e);\n }\n }\n hide() {\n if (this.hasContentTarget) try {\n this.contentTarget.hidePopover();\n this.element.setAttribute(\"data-state\", \"closed\");\n // Clear positioned flag for next open\n this.contentTarget.removeAttribute(\"data-positioned\");\n // Clean up positioning listeners\n this.teardownPositioning();\n // Dispatch custom event\n this.element.dispatchEvent(new CustomEvent(\"orbital:popover:hidden\", {\n bubbles: true,\n detail: {\n popover: this.contentTarget\n }\n }));\n } catch (e) {\n // Popover API not supported, fallback gracefully\n console.warn(\"Popover API not supported:\", e);\n }\n }\n delayedHide() {\n if (this.hideDelayValue === 0) {\n this.hide();\n return;\n }\n this.hideTimeout = setTimeout(()=>{\n this.hide();\n }, this.hideDelayValue);\n }\n async toggle() {\n if (this.hasContentTarget) try {\n const isOpen = this.element.getAttribute(\"data-state\") === \"open\";\n if (isOpen) {\n this.contentTarget.hidePopover();\n this.element.setAttribute(\"data-state\", \"closed\");\n this.contentTarget.removeAttribute(\"data-positioned\");\n this.teardownPositioning();\n } else {\n this.contentTarget.removeAttribute(\"data-positioned\");\n this.contentTarget.showPopover();\n this.element.setAttribute(\"data-state\", \"open\");\n const { x: x, y: y, placement: placement } = await this.calculatePosition();\n this.contentTarget.style.left = `${x}px`;\n this.contentTarget.style.top = `${y}px`;\n this.contentTarget.dataset.placement = placement;\n this.contentTarget.setAttribute(\"data-positioned\", \"true\");\n this.setupPositioning();\n }\n } catch (e) {\n // Popover API not supported, fallback gracefully\n console.warn(\"Popover API not supported:\", e);\n }\n }\n static COMPASS_TO_PLACEMENT = {\n n: \"top\",\n ne: \"top-end\",\n e: \"right\",\n se: \"bottom-end\",\n s: \"bottom\",\n sw: \"bottom-start\",\n w: \"left\",\n nw: \"top-start\"\n };\n // Calculate position without applying it (for pre-positioning)\n async calculatePosition() {\n if (!this.hasTriggerTarget || !this.hasContentTarget) return {\n x: 0,\n y: 0,\n placement: \"bottom\"\n };\n const referenceEl = this.triggerTarget;\n const floatingEl = this.contentTarget;\n let middleware, placement;\n if (this.positionValue === \"auto\") middleware = [\n (0, $729e420fd9c85e8f$export$cc800923e997bb8)(8),\n (0, $729e420fd9c85e8f$export$91fb6ecbd551914)(),\n (0, $729e420fd9c85e8f$export$fba63a578e423eb)({\n padding: 8\n })\n ];\n else {\n placement = this.constructor.COMPASS_TO_PLACEMENT[this.positionValue] || this.positionValue;\n middleware = [\n (0, $729e420fd9c85e8f$export$cc800923e997bb8)(8),\n (0, $729e420fd9c85e8f$export$8a83211c878a3f1f)(),\n (0, $729e420fd9c85e8f$export$fba63a578e423eb)({\n padding: 8\n })\n ];\n }\n try {\n const result = await (0, $729e420fd9c85e8f$export$48a53dcb22e581d0)(referenceEl, floatingEl, {\n placement: placement,\n middleware: middleware\n });\n return {\n x: result.x,\n y: result.y,\n placement: result.placement || placement || \"bottom\"\n };\n } catch (e) {\n console.warn(\"Failed to compute position:\", e);\n return {\n x: 0,\n y: 0,\n placement: \"bottom\"\n };\n }\n }\n // Apply position and placement data attribute\n async updatePosition() {\n const { x: x, y: y, placement: placement } = await this.calculatePosition();\n if (this.hasContentTarget) {\n Object.assign(this.contentTarget.style, {\n left: `${x}px`,\n top: `${y}px`\n });\n this.contentTarget.dataset.placement = placement;\n }\n }\n setupPositioning() {\n // Reposition on scroll and resize\n window.addEventListener(\"scroll\", this.boundUpdatePosition, true);\n window.addEventListener(\"resize\", this.boundUpdatePosition);\n }\n teardownPositioning() {\n window.removeEventListener(\"scroll\", this.boundUpdatePosition, true);\n window.removeEventListener(\"resize\", this.boundUpdatePosition);\n }\n // Lifecycle callback when position value changes\n positionValueChanged() {\n // Reposition if popover is currently open\n if (this.element.getAttribute(\"data-state\") === \"open\") this.updatePosition();\n }\n // Private methods\n setupHoverTrigger() {\n this.boundCancelHide = ()=>{\n if (this.hideTimeout) {\n clearTimeout(this.hideTimeout);\n this.hideTimeout = null;\n }\n };\n this.boundDelayedShow = ()=>{\n this.cancelShowTimeout();\n if (this.showDelayValue === 0) this.show();\n else this.showTimeout = setTimeout(()=>this.show(), this.showDelayValue);\n };\n this.boundCancelShow = ()=>{\n this.cancelShowTimeout();\n };\n if (this.hasTriggerTarget) {\n this.triggerTarget.addEventListener(\"mouseenter\", this.boundDelayedShow);\n this.triggerTarget.addEventListener(\"mouseleave\", this.boundDelayedHide);\n this.triggerTarget.addEventListener(\"mouseleave\", this.boundCancelShow);\n }\n if (this.hasContentTarget) {\n this.contentTarget.addEventListener(\"mouseenter\", this.boundCancelHide);\n this.contentTarget.addEventListener(\"mouseleave\", this.boundDelayedHide);\n }\n }\n cancelShowTimeout() {\n if (this.showTimeout) {\n clearTimeout(this.showTimeout);\n this.showTimeout = null;\n }\n }\n setupClickTrigger() {\n if (this.hasTriggerTarget) this.triggerTarget.addEventListener(\"click\", this.handleClick.bind(this));\n }\n teardownTrigger() {\n if (this.hasTriggerTarget) {\n this.triggerTarget.removeEventListener(\"mouseenter\", this.boundDelayedShow);\n this.triggerTarget.removeEventListener(\"mouseleave\", this.boundDelayedHide);\n this.triggerTarget.removeEventListener(\"mouseleave\", this.boundCancelShow);\n this.triggerTarget.removeEventListener(\"click\", this.handleClick.bind(this));\n }\n if (this.hasContentTarget) {\n this.contentTarget.removeEventListener(\"mouseenter\", this.boundCancelHide);\n this.contentTarget.removeEventListener(\"mouseleave\", this.boundDelayedHide);\n }\n }\n handleClick(event) {\n if (!this.hasContentTarget) return;\n // Don't open if the trigger (or a button inside it) is disabled\n if (this.triggerTarget.closest('[data-disabled=\"true\"]') || this.triggerTarget.querySelector('[data-disabled=\"true\"], [disabled], [aria-disabled=\"true\"]')) return;\n event.preventDefault();\n this.toggle();\n }\n async handleToggle(event) {\n const state = event.newState // \"open\" or \"closed\"\n ;\n this.element.setAttribute(\"data-state\", state);\n // Update position when opened via native toggle event\n if (state === \"open\") {\n // Clear positioned flag during position calculation\n this.contentTarget.removeAttribute(\"data-positioned\");\n // Position immediately (popover is already shown by native API)\n const { x: x, y: y, placement: placement } = await this.calculatePosition();\n this.contentTarget.style.left = `${x}px`;\n this.contentTarget.style.top = `${y}px`;\n this.contentTarget.dataset.placement = placement;\n // Mark as positioned to trigger CSS visibility\n this.contentTarget.setAttribute(\"data-positioned\", \"true\");\n this.setupPositioning();\n // Focus first focusable item inside the popover (e.g. menu item)\n requestAnimationFrame(()=>{\n const firstItem = this.contentTarget.querySelector('[role=\"menuitem\"]:not([aria-disabled=\"true\"])');\n if (firstItem) firstItem.focus();\n });\n } else this.teardownPositioning();\n // Dispatch custom event\n const eventName = state === \"open\" ? \"orbital:popover:shown\" : \"orbital:popover:hidden\";\n this.element.dispatchEvent(new CustomEvent(eventName, {\n bubbles: true,\n detail: {\n popover: this.contentTarget\n }\n }));\n }\n}\n\n\n\nclass $e3f75a5ee2f5e098$export$2e2bcd8739ae039 extends (0, $27d274cf1203127c$export$bd0bf19f25da8474) {\n static targets = [\n \"input\",\n \"label\"\n ];\n static values = {\n selected: String\n };\n connect() {\n // Initialize menu item states on connect\n this.updateMenuStates(this.selectedValue);\n }\n handleItemClick(event) {\n event.preventDefault();\n const menuItem = event.currentTarget;\n // Don't select disabled items\n if (menuItem.dataset.disabled === \"true\" || menuItem.getAttribute(\"aria-disabled\") === \"true\") return;\n const value = menuItem.dataset.value;\n const label = menuItem.dataset.label;\n this.selectOption(value, label);\n this.closeDropdown();\n }\n selectOption(value, label) {\n // Update hidden input value\n if (this.hasInputTarget) this.inputTarget.value = value;\n // Update trigger label\n if (this.hasLabelTarget) {\n this.labelTarget.textContent = label;\n this.labelTarget.classList.remove(\"Orbital-Select-Placeholder\");\n this.labelTarget.classList.add(\"Orbital-Select-Label\");\n }\n // Update stored value\n this.selectedValue = value;\n // Update menu item selected states\n this.updateMenuStates(value);\n // Dispatch custom event for external listeners\n this.element.dispatchEvent(new CustomEvent(\"orbital:select:changed\", {\n bubbles: true,\n detail: {\n value: value,\n label: label\n }\n }));\n // Trigger native change event on hidden input for form integration\n if (this.hasInputTarget) this.inputTarget.dispatchEvent(new Event(\"change\", {\n bubbles: true\n }));\n }\n updateMenuStates(selectedValue) {\n const menuItems = this.element.querySelectorAll(\".Orbital-Menu-Item\");\n menuItems.forEach((item)=>{\n const itemValue = item.dataset.value;\n const isSelected = itemValue === selectedValue;\n // Update data attribute for CSS styling\n if (isSelected) {\n item.setAttribute(\"data-selected\", \"true\");\n item.setAttribute(\"aria-selected\", \"true\");\n } else {\n item.removeAttribute(\"data-selected\");\n item.setAttribute(\"aria-selected\", \"false\");\n }\n });\n }\n closeDropdown() {\n const container = this.element.querySelector('[data-controller=\"orbital-popover\"]');\n if (!container) return;\n const app = this.application;\n const popoverCtrl = app.getControllerForElementAndIdentifier(container, \"orbital-popover\");\n if (popoverCtrl) popoverCtrl.hide();\n }\n // Lifecycle callback when selected value changes externally\n selectedValueChanged() {\n this.updateMenuStates(this.selectedValue);\n }\n}\n\n\nlet $7356de1c3aaa9c7b$export$8d516e055d924071;\nif (window.Stimulus) $7356de1c3aaa9c7b$export$8d516e055d924071 = window.Stimulus;\nelse {\n $7356de1c3aaa9c7b$export$8d516e055d924071 = (0, $27d274cf1203127c$export$16975c34e60e1e61).start();\n $7356de1c3aaa9c7b$export$8d516e055d924071.debug = false;\n window.Stimulus = $7356de1c3aaa9c7b$export$8d516e055d924071;\n}\n$7356de1c3aaa9c7b$export$8d516e055d924071.register(\"orbital-avatar\", (0, $e0d42db4f8500502$export$2e2bcd8739ae039));\n$7356de1c3aaa9c7b$export$8d516e055d924071.register(\"o-accordion\", (0, $ebfa444edf7e74f3$export$2e2bcd8739ae039));\n$7356de1c3aaa9c7b$export$8d516e055d924071.register(\"orbital-modal\", (0, $047eab1dbee5a24a$export$2e2bcd8739ae039));\n$7356de1c3aaa9c7b$export$8d516e055d924071.register(\"orbital-popover\", (0, $4454c65d0a913843$export$2e2bcd8739ae039));\n$7356de1c3aaa9c7b$export$8d516e055d924071.register(\"orbital-menu\", (0, $334ff5ad33338129$export$2e2bcd8739ae039));\n$7356de1c3aaa9c7b$export$8d516e055d924071.register(\"orbital-menu-sub\", (0, $7622594fb0c0d38c$export$2e2bcd8739ae039));\n$7356de1c3aaa9c7b$export$8d516e055d924071.register(\"orbital-select\", (0, $e3f75a5ee2f5e098$export$2e2bcd8739ae039));\ndocument.addEventListener(\"click\", (event)=>{\n const trigger = event.target.closest(\"[data-open-modal], [data-open-dialog]\");\n if (!trigger) return;\n event.preventDefault();\n const id = trigger.dataset.openModal || trigger.dataset.openDialog;\n const modal = document.getElementById(id);\n if (!modal) return;\n const controller = $7356de1c3aaa9c7b$export$8d516e055d924071.getControllerForElementAndIdentifier(modal, \"orbital-modal\");\n if (controller) controller.show();\n});\n\n})();\n//# sourceMappingURL=index.js.map\n","import { Application } from \"@hotwired/stimulus\"\n\nlet application\nif (window.Stimulus) {\n application = window.Stimulus\n} else {\n application = Application.start()\n application.debug = false\n window.Stimulus = application\n}\n\nimport AccordionController from \"./controllers/accordion_controller\"\nimport AvatarController from \"./controllers/avatar_controller\"\nimport MenuController from \"./controllers/menu_controller\"\nimport MenuSubController from \"./controllers/menu_sub_controller\"\nimport ModalController from \"./controllers/modal_controller\"\nimport PopoverController from \"./controllers/popover_controller\"\nimport SelectController from \"./controllers/select_controller\"\n\napplication.register(\"orbital-avatar\", AvatarController)\napplication.register(\"o-accordion\", AccordionController)\napplication.register(\"orbital-modal\", ModalController)\napplication.register(\"orbital-popover\", PopoverController)\napplication.register(\"orbital-menu\", MenuController)\napplication.register(\"orbital-menu-sub\", MenuSubController)\napplication.register(\"orbital-select\", SelectController)\n\ndocument.addEventListener(\"click\", (event) => {\n const trigger = event.target.closest(\"[data-open-modal], [data-open-dialog]\")\n if (!trigger) return\n\n event.preventDefault()\n const id = trigger.dataset.openModal || trigger.dataset.openDialog\n const modal = document.getElementById(id)\n if (!modal) return\n\n const controller = application.getControllerForElementAndIdentifier(modal, \"orbital-modal\")\n if (controller) controller.show()\n})\n\nexport { application }\n","/*\nStimulus 3.2.1\nCopyright © 2023 Basecamp, LLC\n */\nclass EventListener {\n constructor(eventTarget, eventName, eventOptions) {\n this.eventTarget = eventTarget;\n this.eventName = eventName;\n this.eventOptions = eventOptions;\n this.unorderedBindings = new Set();\n }\n connect() {\n this.eventTarget.addEventListener(this.eventName, this, this.eventOptions);\n }\n disconnect() {\n this.eventTarget.removeEventListener(this.eventName, this, this.eventOptions);\n }\n bindingConnected(binding) {\n this.unorderedBindings.add(binding);\n }\n bindingDisconnected(binding) {\n this.unorderedBindings.delete(binding);\n }\n handleEvent(event) {\n const extendedEvent = extendEvent(event);\n for (const binding of this.bindings) {\n if (extendedEvent.immediatePropagationStopped) {\n break;\n }\n else {\n binding.handleEvent(extendedEvent);\n }\n }\n }\n hasBindings() {\n return this.unorderedBindings.size > 0;\n }\n get bindings() {\n return Array.from(this.unorderedBindings).sort((left, right) => {\n const leftIndex = left.index, rightIndex = right.index;\n return leftIndex < rightIndex ? -1 : leftIndex > rightIndex ? 1 : 0;\n });\n }\n}\nfunction extendEvent(event) {\n if (\"immediatePropagationStopped\" in event) {\n return event;\n }\n else {\n const { stopImmediatePropagation } = event;\n return Object.assign(event, {\n immediatePropagationStopped: false,\n stopImmediatePropagation() {\n this.immediatePropagationStopped = true;\n stopImmediatePropagation.call(this);\n },\n });\n }\n}\n\nclass Dispatcher {\n constructor(application) {\n this.application = application;\n this.eventListenerMaps = new Map();\n this.started = false;\n }\n start() {\n if (!this.started) {\n this.started = true;\n this.eventListeners.forEach((eventListener) => eventListener.connect());\n }\n }\n stop() {\n if (this.started) {\n this.started = false;\n this.eventListeners.forEach((eventListener) => eventListener.disconnect());\n }\n }\n get eventListeners() {\n return Array.from(this.eventListenerMaps.values()).reduce((listeners, map) => listeners.concat(Array.from(map.values())), []);\n }\n bindingConnected(binding) {\n this.fetchEventListenerForBinding(binding).bindingConnected(binding);\n }\n bindingDisconnected(binding, clearEventListeners = false) {\n this.fetchEventListenerForBinding(binding).bindingDisconnected(binding);\n if (clearEventListeners)\n this.clearEventListenersForBinding(binding);\n }\n handleError(error, message, detail = {}) {\n this.application.handleError(error, `Error ${message}`, detail);\n }\n clearEventListenersForBinding(binding) {\n const eventListener = this.fetchEventListenerForBinding(binding);\n if (!eventListener.hasBindings()) {\n eventListener.disconnect();\n this.removeMappedEventListenerFor(binding);\n }\n }\n removeMappedEventListenerFor(binding) {\n const { eventTarget, eventName, eventOptions } = binding;\n const eventListenerMap = this.fetchEventListenerMapForEventTarget(eventTarget);\n const cacheKey = this.cacheKey(eventName, eventOptions);\n eventListenerMap.delete(cacheKey);\n if (eventListenerMap.size == 0)\n this.eventListenerMaps.delete(eventTarget);\n }\n fetchEventListenerForBinding(binding) {\n const { eventTarget, eventName, eventOptions } = binding;\n return this.fetchEventListener(eventTarget, eventName, eventOptions);\n }\n fetchEventListener(eventTarget, eventName, eventOptions) {\n const eventListenerMap = this.fetchEventListenerMapForEventTarget(eventTarget);\n const cacheKey = this.cacheKey(eventName, eventOptions);\n let eventListener = eventListenerMap.get(cacheKey);\n if (!eventListener) {\n eventListener = this.createEventListener(eventTarget, eventName, eventOptions);\n eventListenerMap.set(cacheKey, eventListener);\n }\n return eventListener;\n }\n createEventListener(eventTarget, eventName, eventOptions) {\n const eventListener = new EventListener(eventTarget, eventName, eventOptions);\n if (this.started) {\n eventListener.connect();\n }\n return eventListener;\n }\n fetchEventListenerMapForEventTarget(eventTarget) {\n let eventListenerMap = this.eventListenerMaps.get(eventTarget);\n if (!eventListenerMap) {\n eventListenerMap = new Map();\n this.eventListenerMaps.set(eventTarget, eventListenerMap);\n }\n return eventListenerMap;\n }\n cacheKey(eventName, eventOptions) {\n const parts = [eventName];\n Object.keys(eventOptions)\n .sort()\n .forEach((key) => {\n parts.push(`${eventOptions[key] ? \"\" : \"!\"}${key}`);\n });\n return parts.join(\":\");\n }\n}\n\nconst defaultActionDescriptorFilters = {\n stop({ event, value }) {\n if (value)\n event.stopPropagation();\n return true;\n },\n prevent({ event, value }) {\n if (value)\n event.preventDefault();\n return true;\n },\n self({ event, value, element }) {\n if (value) {\n return element === event.target;\n }\n else {\n return true;\n }\n },\n};\nconst descriptorPattern = /^(?:(?:([^.]+?)\\+)?(.+?)(?:\\.(.+?))?(?:@(window|document))?->)?(.+?)(?:#([^:]+?))(?::(.+))?$/;\nfunction parseActionDescriptorString(descriptorString) {\n const source = descriptorString.trim();\n const matches = source.match(descriptorPattern) || [];\n let eventName = matches[2];\n let keyFilter = matches[3];\n if (keyFilter && ![\"keydown\", \"keyup\", \"keypress\"].includes(eventName)) {\n eventName += `.${keyFilter}`;\n keyFilter = \"\";\n }\n return {\n eventTarget: parseEventTarget(matches[4]),\n eventName,\n eventOptions: matches[7] ? parseEventOptions(matches[7]) : {},\n identifier: matches[5],\n methodName: matches[6],\n keyFilter: matches[1] || keyFilter,\n };\n}\nfunction parseEventTarget(eventTargetName) {\n if (eventTargetName == \"window\") {\n return window;\n }\n else if (eventTargetName == \"document\") {\n return document;\n }\n}\nfunction parseEventOptions(eventOptions) {\n return eventOptions\n .split(\":\")\n .reduce((options, token) => Object.assign(options, { [token.replace(/^!/, \"\")]: !/^!/.test(token) }), {});\n}\nfunction stringifyEventTarget(eventTarget) {\n if (eventTarget == window) {\n return \"window\";\n }\n else if (eventTarget == document) {\n return \"document\";\n }\n}\n\nfunction camelize(value) {\n return value.replace(/(?:[_-])([a-z0-9])/g, (_, char) => char.toUpperCase());\n}\nfunction namespaceCamelize(value) {\n return camelize(value.replace(/--/g, \"-\").replace(/__/g, \"_\"));\n}\nfunction capitalize(value) {\n return value.charAt(0).toUpperCase() + value.slice(1);\n}\nfunction dasherize(value) {\n return value.replace(/([A-Z])/g, (_, char) => `-${char.toLowerCase()}`);\n}\nfunction tokenize(value) {\n return value.match(/[^\\s]+/g) || [];\n}\n\nfunction isSomething(object) {\n return object !== null && object !== undefined;\n}\nfunction hasProperty(object, property) {\n return Object.prototype.hasOwnProperty.call(object, property);\n}\n\nconst allModifiers = [\"meta\", \"ctrl\", \"alt\", \"shift\"];\nclass Action {\n constructor(element, index, descriptor, schema) {\n this.element = element;\n this.index = index;\n this.eventTarget = descriptor.eventTarget || element;\n this.eventName = descriptor.eventName || getDefaultEventNameForElement(element) || error(\"missing event name\");\n this.eventOptions = descriptor.eventOptions || {};\n this.identifier = descriptor.identifier || error(\"missing identifier\");\n this.methodName = descriptor.methodName || error(\"missing method name\");\n this.keyFilter = descriptor.keyFilter || \"\";\n this.schema = schema;\n }\n static forToken(token, schema) {\n return new this(token.element, token.index, parseActionDescriptorString(token.content), schema);\n }\n toString() {\n const eventFilter = this.keyFilter ? `.${this.keyFilter}` : \"\";\n const eventTarget = this.eventTargetName ? `@${this.eventTargetName}` : \"\";\n return `${this.eventName}${eventFilter}${eventTarget}->${this.identifier}#${this.methodName}`;\n }\n shouldIgnoreKeyboardEvent(event) {\n if (!this.keyFilter) {\n return false;\n }\n const filters = this.keyFilter.split(\"+\");\n if (this.keyFilterDissatisfied(event, filters)) {\n return true;\n }\n const standardFilter = filters.filter((key) => !allModifiers.includes(key))[0];\n if (!standardFilter) {\n return false;\n }\n if (!hasProperty(this.keyMappings, standardFilter)) {\n error(`contains unknown key filter: ${this.keyFilter}`);\n }\n return this.keyMappings[standardFilter].toLowerCase() !== event.key.toLowerCase();\n }\n shouldIgnoreMouseEvent(event) {\n if (!this.keyFilter) {\n return false;\n }\n const filters = [this.keyFilter];\n if (this.keyFilterDissatisfied(event, filters)) {\n return true;\n }\n return false;\n }\n get params() {\n const params = {};\n const pattern = new RegExp(`^data-${this.identifier}-(.+)-param$`, \"i\");\n for (const { name, value } of Array.from(this.element.attributes)) {\n const match = name.match(pattern);\n const key = match && match[1];\n if (key) {\n params[camelize(key)] = typecast(value);\n }\n }\n return params;\n }\n get eventTargetName() {\n return stringifyEventTarget(this.eventTarget);\n }\n get keyMappings() {\n return this.schema.keyMappings;\n }\n keyFilterDissatisfied(event, filters) {\n const [meta, ctrl, alt, shift] = allModifiers.map((modifier) => filters.includes(modifier));\n return event.metaKey !== meta || event.ctrlKey !== ctrl || event.altKey !== alt || event.shiftKey !== shift;\n }\n}\nconst defaultEventNames = {\n a: () => \"click\",\n button: () => \"click\",\n form: () => \"submit\",\n details: () => \"toggle\",\n input: (e) => (e.getAttribute(\"type\") == \"submit\" ? \"click\" : \"input\"),\n select: () => \"change\",\n textarea: () => \"input\",\n};\nfunction getDefaultEventNameForElement(element) {\n const tagName = element.tagName.toLowerCase();\n if (tagName in defaultEventNames) {\n return defaultEventNames[tagName](element);\n }\n}\nfunction error(message) {\n throw new Error(message);\n}\nfunction typecast(value) {\n try {\n return JSON.parse(value);\n }\n catch (o_O) {\n return value;\n }\n}\n\nclass Binding {\n constructor(context, action) {\n this.context = context;\n this.action = action;\n }\n get index() {\n return this.action.index;\n }\n get eventTarget() {\n return this.action.eventTarget;\n }\n get eventOptions() {\n return this.action.eventOptions;\n }\n get identifier() {\n return this.context.identifier;\n }\n handleEvent(event) {\n const actionEvent = this.prepareActionEvent(event);\n if (this.willBeInvokedByEvent(event) && this.applyEventModifiers(actionEvent)) {\n this.invokeWithEvent(actionEvent);\n }\n }\n get eventName() {\n return this.action.eventName;\n }\n get method() {\n const method = this.controller[this.methodName];\n if (typeof method == \"function\") {\n return method;\n }\n throw new Error(`Action \"${this.action}\" references undefined method \"${this.methodName}\"`);\n }\n applyEventModifiers(event) {\n const { element } = this.action;\n const { actionDescriptorFilters } = this.context.application;\n const { controller } = this.context;\n let passes = true;\n for (const [name, value] of Object.entries(this.eventOptions)) {\n if (name in actionDescriptorFilters) {\n const filter = actionDescriptorFilters[name];\n passes = passes && filter({ name, value, event, element, controller });\n }\n else {\n continue;\n }\n }\n return passes;\n }\n prepareActionEvent(event) {\n return Object.assign(event, { params: this.action.params });\n }\n invokeWithEvent(event) {\n const { target, currentTarget } = event;\n try {\n this.method.call(this.controller, event);\n this.context.logDebugActivity(this.methodName, { event, target, currentTarget, action: this.methodName });\n }\n catch (error) {\n const { identifier, controller, element, index } = this;\n const detail = { identifier, controller, element, index, event };\n this.context.handleError(error, `invoking action \"${this.action}\"`, detail);\n }\n }\n willBeInvokedByEvent(event) {\n const eventTarget = event.target;\n if (event instanceof KeyboardEvent && this.action.shouldIgnoreKeyboardEvent(event)) {\n return false;\n }\n if (event instanceof MouseEvent && this.action.shouldIgnoreMouseEvent(event)) {\n return false;\n }\n if (this.element === eventTarget) {\n return true;\n }\n else if (eventTarget instanceof Element && this.element.contains(eventTarget)) {\n return this.scope.containsElement(eventTarget);\n }\n else {\n return this.scope.containsElement(this.action.element);\n }\n }\n get controller() {\n return this.context.controller;\n }\n get methodName() {\n return this.action.methodName;\n }\n get element() {\n return this.scope.element;\n }\n get scope() {\n return this.context.scope;\n }\n}\n\nclass ElementObserver {\n constructor(element, delegate) {\n this.mutationObserverInit = { attributes: true, childList: true, subtree: true };\n this.element = element;\n this.started = false;\n this.delegate = delegate;\n this.elements = new Set();\n this.mutationObserver = new MutationObserver((mutations) => this.processMutations(mutations));\n }\n start() {\n if (!this.started) {\n this.started = true;\n this.mutationObserver.observe(this.element, this.mutationObserverInit);\n this.refresh();\n }\n }\n pause(callback) {\n if (this.started) {\n this.mutationObserver.disconnect();\n this.started = false;\n }\n callback();\n if (!this.started) {\n this.mutationObserver.observe(this.element, this.mutationObserverInit);\n this.started = true;\n }\n }\n stop() {\n if (this.started) {\n this.mutationObserver.takeRecords();\n this.mutationObserver.disconnect();\n this.started = false;\n }\n }\n refresh() {\n if (this.started) {\n const matches = new Set(this.matchElementsInTree());\n for (const element of Array.from(this.elements)) {\n if (!matches.has(element)) {\n this.removeElement(element);\n }\n }\n for (const element of Array.from(matches)) {\n this.addElement(element);\n }\n }\n }\n processMutations(mutations) {\n if (this.started) {\n for (const mutation of mutations) {\n this.processMutation(mutation);\n }\n }\n }\n processMutation(mutation) {\n if (mutation.type == \"attributes\") {\n this.processAttributeChange(mutation.target, mutation.attributeName);\n }\n else if (mutation.type == \"childList\") {\n this.processRemovedNodes(mutation.removedNodes);\n this.processAddedNodes(mutation.addedNodes);\n }\n }\n processAttributeChange(element, attributeName) {\n if (this.elements.has(element)) {\n if (this.delegate.elementAttributeChanged && this.matchElement(element)) {\n this.delegate.elementAttributeChanged(element, attributeName);\n }\n else {\n this.removeElement(element);\n }\n }\n else if (this.matchElement(element)) {\n this.addElement(element);\n }\n }\n processRemovedNodes(nodes) {\n for (const node of Array.from(nodes)) {\n const element = this.elementFromNode(node);\n if (element) {\n this.processTree(element, this.removeElement);\n }\n }\n }\n processAddedNodes(nodes) {\n for (const node of Array.from(nodes)) {\n const element = this.elementFromNode(node);\n if (element && this.elementIsActive(element)) {\n this.processTree(element, this.addElement);\n }\n }\n }\n matchElement(element) {\n return this.delegate.matchElement(element);\n }\n matchElementsInTree(tree = this.element) {\n return this.delegate.matchElementsInTree(tree);\n }\n processTree(tree, processor) {\n for (const element of this.matchElementsInTree(tree)) {\n processor.call(this, element);\n }\n }\n elementFromNode(node) {\n if (node.nodeType == Node.ELEMENT_NODE) {\n return node;\n }\n }\n elementIsActive(element) {\n if (element.isConnected != this.element.isConnected) {\n return false;\n }\n else {\n return this.element.contains(element);\n }\n }\n addElement(element) {\n if (!this.elements.has(element)) {\n if (this.elementIsActive(element)) {\n this.elements.add(element);\n if (this.delegate.elementMatched) {\n this.delegate.elementMatched(element);\n }\n }\n }\n }\n removeElement(element) {\n if (this.elements.has(element)) {\n this.elements.delete(element);\n if (this.delegate.elementUnmatched) {\n this.delegate.elementUnmatched(element);\n }\n }\n }\n}\n\nclass AttributeObserver {\n constructor(element, attributeName, delegate) {\n this.attributeName = attributeName;\n this.delegate = delegate;\n this.elementObserver = new ElementObserver(element, this);\n }\n get element() {\n return this.elementObserver.element;\n }\n get selector() {\n return `[${this.attributeName}]`;\n }\n start() {\n this.elementObserver.start();\n }\n pause(callback) {\n this.elementObserver.pause(callback);\n }\n stop() {\n this.elementObserver.stop();\n }\n refresh() {\n this.elementObserver.refresh();\n }\n get started() {\n return this.elementObserver.started;\n }\n matchElement(element) {\n return element.hasAttribute(this.attributeName);\n }\n matchElementsInTree(tree) {\n const match = this.matchElement(tree) ? [tree] : [];\n const matches = Array.from(tree.querySelectorAll(this.selector));\n return match.concat(matches);\n }\n elementMatched(element) {\n if (this.delegate.elementMatchedAttribute) {\n this.delegate.elementMatchedAttribute(element, this.attributeName);\n }\n }\n elementUnmatched(element) {\n if (this.delegate.elementUnmatchedAttribute) {\n this.delegate.elementUnmatchedAttribute(element, this.attributeName);\n }\n }\n elementAttributeChanged(element, attributeName) {\n if (this.delegate.elementAttributeValueChanged && this.attributeName == attributeName) {\n this.delegate.elementAttributeValueChanged(element, attributeName);\n }\n }\n}\n\nfunction add(map, key, value) {\n fetch(map, key).add(value);\n}\nfunction del(map, key, value) {\n fetch(map, key).delete(value);\n prune(map, key);\n}\nfunction fetch(map, key) {\n let values = map.get(key);\n if (!values) {\n values = new Set();\n map.set(key, values);\n }\n return values;\n}\nfunction prune(map, key) {\n const values = map.get(key);\n if (values != null && values.size == 0) {\n map.delete(key);\n }\n}\n\nclass Multimap {\n constructor() {\n this.valuesByKey = new Map();\n }\n get keys() {\n return Array.from(this.valuesByKey.keys());\n }\n get values() {\n const sets = Array.from(this.valuesByKey.values());\n return sets.reduce((values, set) => values.concat(Array.from(set)), []);\n }\n get size() {\n const sets = Array.from(this.valuesByKey.values());\n return sets.reduce((size, set) => size + set.size, 0);\n }\n add(key, value) {\n add(this.valuesByKey, key, value);\n }\n delete(key, value) {\n del(this.valuesByKey, key, value);\n }\n has(key, value) {\n const values = this.valuesByKey.get(key);\n return values != null && values.has(value);\n }\n hasKey(key) {\n return this.valuesByKey.has(key);\n }\n hasValue(value) {\n const sets = Array.from(this.valuesByKey.values());\n return sets.some((set) => set.has(value));\n }\n getValuesForKey(key) {\n const values = this.valuesByKey.get(key);\n return values ? Array.from(values) : [];\n }\n getKeysForValue(value) {\n return Array.from(this.valuesByKey)\n .filter(([_key, values]) => values.has(value))\n .map(([key, _values]) => key);\n }\n}\n\nclass IndexedMultimap extends Multimap {\n constructor() {\n super();\n this.keysByValue = new Map();\n }\n get values() {\n return Array.from(this.keysByValue.keys());\n }\n add(key, value) {\n super.add(key, value);\n add(this.keysByValue, value, key);\n }\n delete(key, value) {\n super.delete(key, value);\n del(this.keysByValue, value, key);\n }\n hasValue(value) {\n return this.keysByValue.has(value);\n }\n getKeysForValue(value) {\n const set = this.keysByValue.get(value);\n return set ? Array.from(set) : [];\n }\n}\n\nclass SelectorObserver {\n constructor(element, selector, delegate, details) {\n this._selector = selector;\n this.details = details;\n this.elementObserver = new ElementObserver(element, this);\n this.delegate = delegate;\n this.matchesByElement = new Multimap();\n }\n get started() {\n return this.elementObserver.started;\n }\n get selector() {\n return this._selector;\n }\n set selector(selector) {\n this._selector = selector;\n this.refresh();\n }\n start() {\n this.elementObserver.start();\n }\n pause(callback) {\n this.elementObserver.pause(callback);\n }\n stop() {\n this.elementObserver.stop();\n }\n refresh() {\n this.elementObserver.refresh();\n }\n get element() {\n return this.elementObserver.element;\n }\n matchElement(element) {\n const { selector } = this;\n if (selector) {\n const matches = element.matches(selector);\n if (this.delegate.selectorMatchElement) {\n return matches && this.delegate.selectorMatchElement(element, this.details);\n }\n return matches;\n }\n else {\n return false;\n }\n }\n matchElementsInTree(tree) {\n const { selector } = this;\n if (selector) {\n const match = this.matchElement(tree) ? [tree] : [];\n const matches = Array.from(tree.querySelectorAll(selector)).filter((match) => this.matchElement(match));\n return match.concat(matches);\n }\n else {\n return [];\n }\n }\n elementMatched(element) {\n const { selector } = this;\n if (selector) {\n this.selectorMatched(element, selector);\n }\n }\n elementUnmatched(element) {\n const selectors = this.matchesByElement.getKeysForValue(element);\n for (const selector of selectors) {\n this.selectorUnmatched(element, selector);\n }\n }\n elementAttributeChanged(element, _attributeName) {\n const { selector } = this;\n if (selector) {\n const matches = this.matchElement(element);\n const matchedBefore = this.matchesByElement.has(selector, element);\n if (matches && !matchedBefore) {\n this.selectorMatched(element, selector);\n }\n else if (!matches && matchedBefore) {\n this.selectorUnmatched(element, selector);\n }\n }\n }\n selectorMatched(element, selector) {\n this.delegate.selectorMatched(element, selector, this.details);\n this.matchesByElement.add(selector, element);\n }\n selectorUnmatched(element, selector) {\n this.delegate.selectorUnmatched(element, selector, this.details);\n this.matchesByElement.delete(selector, element);\n }\n}\n\nclass StringMapObserver {\n constructor(element, delegate) {\n this.element = element;\n this.delegate = delegate;\n this.started = false;\n this.stringMap = new Map();\n this.mutationObserver = new MutationObserver((mutations) => this.processMutations(mutations));\n }\n start() {\n if (!this.started) {\n this.started = true;\n this.mutationObserver.observe(this.element, { attributes: true, attributeOldValue: true });\n this.refresh();\n }\n }\n stop() {\n if (this.started) {\n this.mutationObserver.takeRecords();\n this.mutationObserver.disconnect();\n this.started = false;\n }\n }\n refresh() {\n if (this.started) {\n for (const attributeName of this.knownAttributeNames) {\n this.refreshAttribute(attributeName, null);\n }\n }\n }\n processMutations(mutations) {\n if (this.started) {\n for (const mutation of mutations) {\n this.processMutation(mutation);\n }\n }\n }\n processMutation(mutation) {\n const attributeName = mutation.attributeName;\n if (attributeName) {\n this.refreshAttribute(attributeName, mutation.oldValue);\n }\n }\n refreshAttribute(attributeName, oldValue) {\n const key = this.delegate.getStringMapKeyForAttribute(attributeName);\n if (key != null) {\n if (!this.stringMap.has(attributeName)) {\n this.stringMapKeyAdded(key, attributeName);\n }\n const value = this.element.getAttribute(attributeName);\n if (this.stringMap.get(attributeName) != value) {\n this.stringMapValueChanged(value, key, oldValue);\n }\n if (value == null) {\n const oldValue = this.stringMap.get(attributeName);\n this.stringMap.delete(attributeName);\n if (oldValue)\n this.stringMapKeyRemoved(key, attributeName, oldValue);\n }\n else {\n this.stringMap.set(attributeName, value);\n }\n }\n }\n stringMapKeyAdded(key, attributeName) {\n if (this.delegate.stringMapKeyAdded) {\n this.delegate.stringMapKeyAdded(key, attributeName);\n }\n }\n stringMapValueChanged(value, key, oldValue) {\n if (this.delegate.stringMapValueChanged) {\n this.delegate.stringMapValueChanged(value, key, oldValue);\n }\n }\n stringMapKeyRemoved(key, attributeName, oldValue) {\n if (this.delegate.stringMapKeyRemoved) {\n this.delegate.stringMapKeyRemoved(key, attributeName, oldValue);\n }\n }\n get knownAttributeNames() {\n return Array.from(new Set(this.currentAttributeNames.concat(this.recordedAttributeNames)));\n }\n get currentAttributeNames() {\n return Array.from(this.element.attributes).map((attribute) => attribute.name);\n }\n get recordedAttributeNames() {\n return Array.from(this.stringMap.keys());\n }\n}\n\nclass TokenListObserver {\n constructor(element, attributeName, delegate) {\n this.attributeObserver = new AttributeObserver(element, attributeName, this);\n this.delegate = delegate;\n this.tokensByElement = new Multimap();\n }\n get started() {\n return this.attributeObserver.started;\n }\n start() {\n this.attributeObserver.start();\n }\n pause(callback) {\n this.attributeObserver.pause(callback);\n }\n stop() {\n this.attributeObserver.stop();\n }\n refresh() {\n this.attributeObserver.refresh();\n }\n get element() {\n return this.attributeObserver.element;\n }\n get attributeName() {\n return this.attributeObserver.attributeName;\n }\n elementMatchedAttribute(element) {\n this.tokensMatched(this.readTokensForElement(element));\n }\n elementAttributeValueChanged(element) {\n const [unmatchedTokens, matchedTokens] = this.refreshTokensForElement(element);\n this.tokensUnmatched(unmatchedTokens);\n this.tokensMatched(matchedTokens);\n }\n elementUnmatchedAttribute(element) {\n this.tokensUnmatched(this.tokensByElement.getValuesForKey(element));\n }\n tokensMatched(tokens) {\n tokens.forEach((token) => this.tokenMatched(token));\n }\n tokensUnmatched(tokens) {\n tokens.forEach((token) => this.tokenUnmatched(token));\n }\n tokenMatched(token) {\n this.delegate.tokenMatched(token);\n this.tokensByElement.add(token.element, token);\n }\n tokenUnmatched(token) {\n this.delegate.tokenUnmatched(token);\n this.tokensByElement.delete(token.element, token);\n }\n refreshTokensForElement(element) {\n const previousTokens = this.tokensByElement.getValuesForKey(element);\n const currentTokens = this.readTokensForElement(element);\n const firstDifferingIndex = zip(previousTokens, currentTokens).findIndex(([previousToken, currentToken]) => !tokensAreEqual(previousToken, currentToken));\n if (firstDifferingIndex == -1) {\n return [[], []];\n }\n else {\n return [previousTokens.slice(firstDifferingIndex), currentTokens.slice(firstDifferingIndex)];\n }\n }\n readTokensForElement(element) {\n const attributeName = this.attributeName;\n const tokenString = element.getAttribute(attributeName) || \"\";\n return parseTokenString(tokenString, element, attributeName);\n }\n}\nfunction parseTokenString(tokenString, element, attributeName) {\n return tokenString\n .trim()\n .split(/\\s+/)\n .filter((content) => content.length)\n .map((content, index) => ({ element, attributeName, content, index }));\n}\nfunction zip(left, right) {\n const length = Math.max(left.length, right.length);\n return Array.from({ length }, (_, index) => [left[index], right[index]]);\n}\nfunction tokensAreEqual(left, right) {\n return left && right && left.index == right.index && left.content == right.content;\n}\n\nclass ValueListObserver {\n constructor(element, attributeName, delegate) {\n this.tokenListObserver = new TokenListObserver(element, attributeName, this);\n this.delegate = delegate;\n this.parseResultsByToken = new WeakMap();\n this.valuesByTokenByElement = new WeakMap();\n }\n get started() {\n return this.tokenListObserver.started;\n }\n start() {\n this.tokenListObserver.start();\n }\n stop() {\n this.tokenListObserver.stop();\n }\n refresh() {\n this.tokenListObserver.refresh();\n }\n get element() {\n return this.tokenListObserver.element;\n }\n get attributeName() {\n return this.tokenListObserver.attributeName;\n }\n tokenMatched(token) {\n const { element } = token;\n const { value } = this.fetchParseResultForToken(token);\n if (value) {\n this.fetchValuesByTokenForElement(element).set(token, value);\n this.delegate.elementMatchedValue(element, value);\n }\n }\n tokenUnmatched(token) {\n const { element } = token;\n const { value } = this.fetchParseResultForToken(token);\n if (value) {\n this.fetchValuesByTokenForElement(element).delete(token);\n this.delegate.elementUnmatchedValue(element, value);\n }\n }\n fetchParseResultForToken(token) {\n let parseResult = this.parseResultsByToken.get(token);\n if (!parseResult) {\n parseResult = this.parseToken(token);\n this.parseResultsByToken.set(token, parseResult);\n }\n return parseResult;\n }\n fetchValuesByTokenForElement(element) {\n let valuesByToken = this.valuesByTokenByElement.get(element);\n if (!valuesByToken) {\n valuesByToken = new Map();\n this.valuesByTokenByElement.set(element, valuesByToken);\n }\n return valuesByToken;\n }\n parseToken(token) {\n try {\n const value = this.delegate.parseValueForToken(token);\n return { value };\n }\n catch (error) {\n return { error };\n }\n }\n}\n\nclass BindingObserver {\n constructor(context, delegate) {\n this.context = context;\n this.delegate = delegate;\n this.bindingsByAction = new Map();\n }\n start() {\n if (!this.valueListObserver) {\n this.valueListObserver = new ValueListObserver(this.element, this.actionAttribute, this);\n this.valueListObserver.start();\n }\n }\n stop() {\n if (this.valueListObserver) {\n this.valueListObserver.stop();\n delete this.valueListObserver;\n this.disconnectAllActions();\n }\n }\n get element() {\n return this.context.element;\n }\n get identifier() {\n return this.context.identifier;\n }\n get actionAttribute() {\n return this.schema.actionAttribute;\n }\n get schema() {\n return this.context.schema;\n }\n get bindings() {\n return Array.from(this.bindingsByAction.values());\n }\n connectAction(action) {\n const binding = new Binding(this.context, action);\n this.bindingsByAction.set(action, binding);\n this.delegate.bindingConnected(binding);\n }\n disconnectAction(action) {\n const binding = this.bindingsByAction.get(action);\n if (binding) {\n this.bindingsByAction.delete(action);\n this.delegate.bindingDisconnected(binding);\n }\n }\n disconnectAllActions() {\n this.bindings.forEach((binding) => this.delegate.bindingDisconnected(binding, true));\n this.bindingsByAction.clear();\n }\n parseValueForToken(token) {\n const action = Action.forToken(token, this.schema);\n if (action.identifier == this.identifier) {\n return action;\n }\n }\n elementMatchedValue(element, action) {\n this.connectAction(action);\n }\n elementUnmatchedValue(element, action) {\n this.disconnectAction(action);\n }\n}\n\nclass ValueObserver {\n constructor(context, receiver) {\n this.context = context;\n this.receiver = receiver;\n this.stringMapObserver = new StringMapObserver(this.element, this);\n this.valueDescriptorMap = this.controller.valueDescriptorMap;\n }\n start() {\n this.stringMapObserver.start();\n this.invokeChangedCallbacksForDefaultValues();\n }\n stop() {\n this.stringMapObserver.stop();\n }\n get element() {\n return this.context.element;\n }\n get controller() {\n return this.context.controller;\n }\n getStringMapKeyForAttribute(attributeName) {\n if (attributeName in this.valueDescriptorMap) {\n return this.valueDescriptorMap[attributeName].name;\n }\n }\n stringMapKeyAdded(key, attributeName) {\n const descriptor = this.valueDescriptorMap[attributeName];\n if (!this.hasValue(key)) {\n this.invokeChangedCallback(key, descriptor.writer(this.receiver[key]), descriptor.writer(descriptor.defaultValue));\n }\n }\n stringMapValueChanged(value, name, oldValue) {\n const descriptor = this.valueDescriptorNameMap[name];\n if (value === null)\n return;\n if (oldValue === null) {\n oldValue = descriptor.writer(descriptor.defaultValue);\n }\n this.invokeChangedCallback(name, value, oldValue);\n }\n stringMapKeyRemoved(key, attributeName, oldValue) {\n const descriptor = this.valueDescriptorNameMap[key];\n if (this.hasValue(key)) {\n this.invokeChangedCallback(key, descriptor.writer(this.receiver[key]), oldValue);\n }\n else {\n this.invokeChangedCallback(key, descriptor.writer(descriptor.defaultValue), oldValue);\n }\n }\n invokeChangedCallbacksForDefaultValues() {\n for (const { key, name, defaultValue, writer } of this.valueDescriptors) {\n if (defaultValue != undefined && !this.controller.data.has(key)) {\n this.invokeChangedCallback(name, writer(defaultValue), undefined);\n }\n }\n }\n invokeChangedCallback(name, rawValue, rawOldValue) {\n const changedMethodName = `${name}Changed`;\n const changedMethod = this.receiver[changedMethodName];\n if (typeof changedMethod == \"function\") {\n const descriptor = this.valueDescriptorNameMap[name];\n try {\n const value = descriptor.reader(rawValue);\n let oldValue = rawOldValue;\n if (rawOldValue) {\n oldValue = descriptor.reader(rawOldValue);\n }\n changedMethod.call(this.receiver, value, oldValue);\n }\n catch (error) {\n if (error instanceof TypeError) {\n error.message = `Stimulus Value \"${this.context.identifier}.${descriptor.name}\" - ${error.message}`;\n }\n throw error;\n }\n }\n }\n get valueDescriptors() {\n const { valueDescriptorMap } = this;\n return Object.keys(valueDescriptorMap).map((key) => valueDescriptorMap[key]);\n }\n get valueDescriptorNameMap() {\n const descriptors = {};\n Object.keys(this.valueDescriptorMap).forEach((key) => {\n const descriptor = this.valueDescriptorMap[key];\n descriptors[descriptor.name] = descriptor;\n });\n return descriptors;\n }\n hasValue(attributeName) {\n const descriptor = this.valueDescriptorNameMap[attributeName];\n const hasMethodName = `has${capitalize(descriptor.name)}`;\n return this.receiver[hasMethodName];\n }\n}\n\nclass TargetObserver {\n constructor(context, delegate) {\n this.context = context;\n this.delegate = delegate;\n this.targetsByName = new Multimap();\n }\n start() {\n if (!this.tokenListObserver) {\n this.tokenListObserver = new TokenListObserver(this.element, this.attributeName, this);\n this.tokenListObserver.start();\n }\n }\n stop() {\n if (this.tokenListObserver) {\n this.disconnectAllTargets();\n this.tokenListObserver.stop();\n delete this.tokenListObserver;\n }\n }\n tokenMatched({ element, content: name }) {\n if (this.scope.containsElement(element)) {\n this.connectTarget(element, name);\n }\n }\n tokenUnmatched({ element, content: name }) {\n this.disconnectTarget(element, name);\n }\n connectTarget(element, name) {\n var _a;\n if (!this.targetsByName.has(name, element)) {\n this.targetsByName.add(name, element);\n (_a = this.tokenListObserver) === null || _a === void 0 ? void 0 : _a.pause(() => this.delegate.targetConnected(element, name));\n }\n }\n disconnectTarget(element, name) {\n var _a;\n if (this.targetsByName.has(name, element)) {\n this.targetsByName.delete(name, element);\n (_a = this.tokenListObserver) === null || _a === void 0 ? void 0 : _a.pause(() => this.delegate.targetDisconnected(element, name));\n }\n }\n disconnectAllTargets() {\n for (const name of this.targetsByName.keys) {\n for (const element of this.targetsByName.getValuesForKey(name)) {\n this.disconnectTarget(element, name);\n }\n }\n }\n get attributeName() {\n return `data-${this.context.identifier}-target`;\n }\n get element() {\n return this.context.element;\n }\n get scope() {\n return this.context.scope;\n }\n}\n\nfunction readInheritableStaticArrayValues(constructor, propertyName) {\n const ancestors = getAncestorsForConstructor(constructor);\n return Array.from(ancestors.reduce((values, constructor) => {\n getOwnStaticArrayValues(constructor, propertyName).forEach((name) => values.add(name));\n return values;\n }, new Set()));\n}\nfunction readInheritableStaticObjectPairs(constructor, propertyName) {\n const ancestors = getAncestorsForConstructor(constructor);\n return ancestors.reduce((pairs, constructor) => {\n pairs.push(...getOwnStaticObjectPairs(constructor, propertyName));\n return pairs;\n }, []);\n}\nfunction getAncestorsForConstructor(constructor) {\n const ancestors = [];\n while (constructor) {\n ancestors.push(constructor);\n constructor = Object.getPrototypeOf(constructor);\n }\n return ancestors.reverse();\n}\nfunction getOwnStaticArrayValues(constructor, propertyName) {\n const definition = constructor[propertyName];\n return Array.isArray(definition) ? definition : [];\n}\nfunction getOwnStaticObjectPairs(constructor, propertyName) {\n const definition = constructor[propertyName];\n return definition ? Object.keys(definition).map((key) => [key, definition[key]]) : [];\n}\n\nclass OutletObserver {\n constructor(context, delegate) {\n this.started = false;\n this.context = context;\n this.delegate = delegate;\n this.outletsByName = new Multimap();\n this.outletElementsByName = new Multimap();\n this.selectorObserverMap = new Map();\n this.attributeObserverMap = new Map();\n }\n start() {\n if (!this.started) {\n this.outletDefinitions.forEach((outletName) => {\n this.setupSelectorObserverForOutlet(outletName);\n this.setupAttributeObserverForOutlet(outletName);\n });\n this.started = true;\n this.dependentContexts.forEach((context) => context.refresh());\n }\n }\n refresh() {\n this.selectorObserverMap.forEach((observer) => observer.refresh());\n this.attributeObserverMap.forEach((observer) => observer.refresh());\n }\n stop() {\n if (this.started) {\n this.started = false;\n this.disconnectAllOutlets();\n this.stopSelectorObservers();\n this.stopAttributeObservers();\n }\n }\n stopSelectorObservers() {\n if (this.selectorObserverMap.size > 0) {\n this.selectorObserverMap.forEach((observer) => observer.stop());\n this.selectorObserverMap.clear();\n }\n }\n stopAttributeObservers() {\n if (this.attributeObserverMap.size > 0) {\n this.attributeObserverMap.forEach((observer) => observer.stop());\n this.attributeObserverMap.clear();\n }\n }\n selectorMatched(element, _selector, { outletName }) {\n const outlet = this.getOutlet(element, outletName);\n if (outlet) {\n this.connectOutlet(outlet, element, outletName);\n }\n }\n selectorUnmatched(element, _selector, { outletName }) {\n const outlet = this.getOutletFromMap(element, outletName);\n if (outlet) {\n this.disconnectOutlet(outlet, element, outletName);\n }\n }\n selectorMatchElement(element, { outletName }) {\n const selector = this.selector(outletName);\n const hasOutlet = this.hasOutlet(element, outletName);\n const hasOutletController = element.matches(`[${this.schema.controllerAttribute}~=${outletName}]`);\n if (selector) {\n return hasOutlet && hasOutletController && element.matches(selector);\n }\n else {\n return false;\n }\n }\n elementMatchedAttribute(_element, attributeName) {\n const outletName = this.getOutletNameFromOutletAttributeName(attributeName);\n if (outletName) {\n this.updateSelectorObserverForOutlet(outletName);\n }\n }\n elementAttributeValueChanged(_element, attributeName) {\n const outletName = this.getOutletNameFromOutletAttributeName(attributeName);\n if (outletName) {\n this.updateSelectorObserverForOutlet(outletName);\n }\n }\n elementUnmatchedAttribute(_element, attributeName) {\n const outletName = this.getOutletNameFromOutletAttributeName(attributeName);\n if (outletName) {\n this.updateSelectorObserverForOutlet(outletName);\n }\n }\n connectOutlet(outlet, element, outletName) {\n var _a;\n if (!this.outletElementsByName.has(outletName, element)) {\n this.outletsByName.add(outletName, outlet);\n this.outletElementsByName.add(outletName, element);\n (_a = this.selectorObserverMap.get(outletName)) === null || _a === void 0 ? void 0 : _a.pause(() => this.delegate.outletConnected(outlet, element, outletName));\n }\n }\n disconnectOutlet(outlet, element, outletName) {\n var _a;\n if (this.outletElementsByName.has(outletName, element)) {\n this.outletsByName.delete(outletName, outlet);\n this.outletElementsByName.delete(outletName, element);\n (_a = this.selectorObserverMap\n .get(outletName)) === null || _a === void 0 ? void 0 : _a.pause(() => this.delegate.outletDisconnected(outlet, element, outletName));\n }\n }\n disconnectAllOutlets() {\n for (const outletName of this.outletElementsByName.keys) {\n for (const element of this.outletElementsByName.getValuesForKey(outletName)) {\n for (const outlet of this.outletsByName.getValuesForKey(outletName)) {\n this.disconnectOutlet(outlet, element, outletName);\n }\n }\n }\n }\n updateSelectorObserverForOutlet(outletName) {\n const observer = this.selectorObserverMap.get(outletName);\n if (observer) {\n observer.selector = this.selector(outletName);\n }\n }\n setupSelectorObserverForOutlet(outletName) {\n const selector = this.selector(outletName);\n const selectorObserver = new SelectorObserver(document.body, selector, this, { outletName });\n this.selectorObserverMap.set(outletName, selectorObserver);\n selectorObserver.start();\n }\n setupAttributeObserverForOutlet(outletName) {\n const attributeName = this.attributeNameForOutletName(outletName);\n const attributeObserver = new AttributeObserver(this.scope.element, attributeName, this);\n this.attributeObserverMap.set(outletName, attributeObserver);\n attributeObserver.start();\n }\n selector(outletName) {\n return this.scope.outlets.getSelectorForOutletName(outletName);\n }\n attributeNameForOutletName(outletName) {\n return this.scope.schema.outletAttributeForScope(this.identifier, outletName);\n }\n getOutletNameFromOutletAttributeName(attributeName) {\n return this.outletDefinitions.find((outletName) => this.attributeNameForOutletName(outletName) === attributeName);\n }\n get outletDependencies() {\n const dependencies = new Multimap();\n this.router.modules.forEach((module) => {\n const constructor = module.definition.controllerConstructor;\n const outlets = readInheritableStaticArrayValues(constructor, \"outlets\");\n outlets.forEach((outlet) => dependencies.add(outlet, module.identifier));\n });\n return dependencies;\n }\n get outletDefinitions() {\n return this.outletDependencies.getKeysForValue(this.identifier);\n }\n get dependentControllerIdentifiers() {\n return this.outletDependencies.getValuesForKey(this.identifier);\n }\n get dependentContexts() {\n const identifiers = this.dependentControllerIdentifiers;\n return this.router.contexts.filter((context) => identifiers.includes(context.identifier));\n }\n hasOutlet(element, outletName) {\n return !!this.getOutlet(element, outletName) || !!this.getOutletFromMap(element, outletName);\n }\n getOutlet(element, outletName) {\n return this.application.getControllerForElementAndIdentifier(element, outletName);\n }\n getOutletFromMap(element, outletName) {\n return this.outletsByName.getValuesForKey(outletName).find((outlet) => outlet.element === element);\n }\n get scope() {\n return this.context.scope;\n }\n get schema() {\n return this.context.schema;\n }\n get identifier() {\n return this.context.identifier;\n }\n get application() {\n return this.context.application;\n }\n get router() {\n return this.application.router;\n }\n}\n\nclass Context {\n constructor(module, scope) {\n this.logDebugActivity = (functionName, detail = {}) => {\n const { identifier, controller, element } = this;\n detail = Object.assign({ identifier, controller, element }, detail);\n this.application.logDebugActivity(this.identifier, functionName, detail);\n };\n this.module = module;\n this.scope = scope;\n this.controller = new module.controllerConstructor(this);\n this.bindingObserver = new BindingObserver(this, this.dispatcher);\n this.valueObserver = new ValueObserver(this, this.controller);\n this.targetObserver = new TargetObserver(this, this);\n this.outletObserver = new OutletObserver(this, this);\n try {\n this.controller.initialize();\n this.logDebugActivity(\"initialize\");\n }\n catch (error) {\n this.handleError(error, \"initializing controller\");\n }\n }\n connect() {\n this.bindingObserver.start();\n this.valueObserver.start();\n this.targetObserver.start();\n this.outletObserver.start();\n try {\n this.controller.connect();\n this.logDebugActivity(\"connect\");\n }\n catch (error) {\n this.handleError(error, \"connecting controller\");\n }\n }\n refresh() {\n this.outletObserver.refresh();\n }\n disconnect() {\n try {\n this.controller.disconnect();\n this.logDebugActivity(\"disconnect\");\n }\n catch (error) {\n this.handleError(error, \"disconnecting controller\");\n }\n this.outletObserver.stop();\n this.targetObserver.stop();\n this.valueObserver.stop();\n this.bindingObserver.stop();\n }\n get application() {\n return this.module.application;\n }\n get identifier() {\n return this.module.identifier;\n }\n get schema() {\n return this.application.schema;\n }\n get dispatcher() {\n return this.application.dispatcher;\n }\n get element() {\n return this.scope.element;\n }\n get parentElement() {\n return this.element.parentElement;\n }\n handleError(error, message, detail = {}) {\n const { identifier, controller, element } = this;\n detail = Object.assign({ identifier, controller, element }, detail);\n this.application.handleError(error, `Error ${message}`, detail);\n }\n targetConnected(element, name) {\n this.invokeControllerMethod(`${name}TargetConnected`, element);\n }\n targetDisconnected(element, name) {\n this.invokeControllerMethod(`${name}TargetDisconnected`, element);\n }\n outletConnected(outlet, element, name) {\n this.invokeControllerMethod(`${namespaceCamelize(name)}OutletConnected`, outlet, element);\n }\n outletDisconnected(outlet, element, name) {\n this.invokeControllerMethod(`${namespaceCamelize(name)}OutletDisconnected`, outlet, element);\n }\n invokeControllerMethod(methodName, ...args) {\n const controller = this.controller;\n if (typeof controller[methodName] == \"function\") {\n controller[methodName](...args);\n }\n }\n}\n\nfunction bless(constructor) {\n return shadow(constructor, getBlessedProperties(constructor));\n}\nfunction shadow(constructor, properties) {\n const shadowConstructor = extend(constructor);\n const shadowProperties = getShadowProperties(constructor.prototype, properties);\n Object.defineProperties(shadowConstructor.prototype, shadowProperties);\n return shadowConstructor;\n}\nfunction getBlessedProperties(constructor) {\n const blessings = readInheritableStaticArrayValues(constructor, \"blessings\");\n return blessings.reduce((blessedProperties, blessing) => {\n const properties = blessing(constructor);\n for (const key in properties) {\n const descriptor = blessedProperties[key] || {};\n blessedProperties[key] = Object.assign(descriptor, properties[key]);\n }\n return blessedProperties;\n }, {});\n}\nfunction getShadowProperties(prototype, properties) {\n return getOwnKeys(properties).reduce((shadowProperties, key) => {\n const descriptor = getShadowedDescriptor(prototype, properties, key);\n if (descriptor) {\n Object.assign(shadowProperties, { [key]: descriptor });\n }\n return shadowProperties;\n }, {});\n}\nfunction getShadowedDescriptor(prototype, properties, key) {\n const shadowingDescriptor = Object.getOwnPropertyDescriptor(prototype, key);\n const shadowedByValue = shadowingDescriptor && \"value\" in shadowingDescriptor;\n if (!shadowedByValue) {\n const descriptor = Object.getOwnPropertyDescriptor(properties, key).value;\n if (shadowingDescriptor) {\n descriptor.get = shadowingDescriptor.get || descriptor.get;\n descriptor.set = shadowingDescriptor.set || descriptor.set;\n }\n return descriptor;\n }\n}\nconst getOwnKeys = (() => {\n if (typeof Object.getOwnPropertySymbols == \"function\") {\n return (object) => [...Object.getOwnPropertyNames(object), ...Object.getOwnPropertySymbols(object)];\n }\n else {\n return Object.getOwnPropertyNames;\n }\n})();\nconst extend = (() => {\n function extendWithReflect(constructor) {\n function extended() {\n return Reflect.construct(constructor, arguments, new.target);\n }\n extended.prototype = Object.create(constructor.prototype, {\n constructor: { value: extended },\n });\n Reflect.setPrototypeOf(extended, constructor);\n return extended;\n }\n function testReflectExtension() {\n const a = function () {\n this.a.call(this);\n };\n const b = extendWithReflect(a);\n b.prototype.a = function () { };\n return new b();\n }\n try {\n testReflectExtension();\n return extendWithReflect;\n }\n catch (error) {\n return (constructor) => class extended extends constructor {\n };\n }\n})();\n\nfunction blessDefinition(definition) {\n return {\n identifier: definition.identifier,\n controllerConstructor: bless(definition.controllerConstructor),\n };\n}\n\nclass Module {\n constructor(application, definition) {\n this.application = application;\n this.definition = blessDefinition(definition);\n this.contextsByScope = new WeakMap();\n this.connectedContexts = new Set();\n }\n get identifier() {\n return this.definition.identifier;\n }\n get controllerConstructor() {\n return this.definition.controllerConstructor;\n }\n get contexts() {\n return Array.from(this.connectedContexts);\n }\n connectContextForScope(scope) {\n const context = this.fetchContextForScope(scope);\n this.connectedContexts.add(context);\n context.connect();\n }\n disconnectContextForScope(scope) {\n const context = this.contextsByScope.get(scope);\n if (context) {\n this.connectedContexts.delete(context);\n context.disconnect();\n }\n }\n fetchContextForScope(scope) {\n let context = this.contextsByScope.get(scope);\n if (!context) {\n context = new Context(this, scope);\n this.contextsByScope.set(scope, context);\n }\n return context;\n }\n}\n\nclass ClassMap {\n constructor(scope) {\n this.scope = scope;\n }\n has(name) {\n return this.data.has(this.getDataKey(name));\n }\n get(name) {\n return this.getAll(name)[0];\n }\n getAll(name) {\n const tokenString = this.data.get(this.getDataKey(name)) || \"\";\n return tokenize(tokenString);\n }\n getAttributeName(name) {\n return this.data.getAttributeNameForKey(this.getDataKey(name));\n }\n getDataKey(name) {\n return `${name}-class`;\n }\n get data() {\n return this.scope.data;\n }\n}\n\nclass DataMap {\n constructor(scope) {\n this.scope = scope;\n }\n get element() {\n return this.scope.element;\n }\n get identifier() {\n return this.scope.identifier;\n }\n get(key) {\n const name = this.getAttributeNameForKey(key);\n return this.element.getAttribute(name);\n }\n set(key, value) {\n const name = this.getAttributeNameForKey(key);\n this.element.setAttribute(name, value);\n return this.get(key);\n }\n has(key) {\n const name = this.getAttributeNameForKey(key);\n return this.element.hasAttribute(name);\n }\n delete(key) {\n if (this.has(key)) {\n const name = this.getAttributeNameForKey(key);\n this.element.removeAttribute(name);\n return true;\n }\n else {\n return false;\n }\n }\n getAttributeNameForKey(key) {\n return `data-${this.identifier}-${dasherize(key)}`;\n }\n}\n\nclass Guide {\n constructor(logger) {\n this.warnedKeysByObject = new WeakMap();\n this.logger = logger;\n }\n warn(object, key, message) {\n let warnedKeys = this.warnedKeysByObject.get(object);\n if (!warnedKeys) {\n warnedKeys = new Set();\n this.warnedKeysByObject.set(object, warnedKeys);\n }\n if (!warnedKeys.has(key)) {\n warnedKeys.add(key);\n this.logger.warn(message, object);\n }\n }\n}\n\nfunction attributeValueContainsToken(attributeName, token) {\n return `[${attributeName}~=\"${token}\"]`;\n}\n\nclass TargetSet {\n constructor(scope) {\n this.scope = scope;\n }\n get element() {\n return this.scope.element;\n }\n get identifier() {\n return this.scope.identifier;\n }\n get schema() {\n return this.scope.schema;\n }\n has(targetName) {\n return this.find(targetName) != null;\n }\n find(...targetNames) {\n return targetNames.reduce((target, targetName) => target || this.findTarget(targetName) || this.findLegacyTarget(targetName), undefined);\n }\n findAll(...targetNames) {\n return targetNames.reduce((targets, targetName) => [\n ...targets,\n ...this.findAllTargets(targetName),\n ...this.findAllLegacyTargets(targetName),\n ], []);\n }\n findTarget(targetName) {\n const selector = this.getSelectorForTargetName(targetName);\n return this.scope.findElement(selector);\n }\n findAllTargets(targetName) {\n const selector = this.getSelectorForTargetName(targetName);\n return this.scope.findAllElements(selector);\n }\n getSelectorForTargetName(targetName) {\n const attributeName = this.schema.targetAttributeForScope(this.identifier);\n return attributeValueContainsToken(attributeName, targetName);\n }\n findLegacyTarget(targetName) {\n const selector = this.getLegacySelectorForTargetName(targetName);\n return this.deprecate(this.scope.findElement(selector), targetName);\n }\n findAllLegacyTargets(targetName) {\n const selector = this.getLegacySelectorForTargetName(targetName);\n return this.scope.findAllElements(selector).map((element) => this.deprecate(element, targetName));\n }\n getLegacySelectorForTargetName(targetName) {\n const targetDescriptor = `${this.identifier}.${targetName}`;\n return attributeValueContainsToken(this.schema.targetAttribute, targetDescriptor);\n }\n deprecate(element, targetName) {\n if (element) {\n const { identifier } = this;\n const attributeName = this.schema.targetAttribute;\n const revisedAttributeName = this.schema.targetAttributeForScope(identifier);\n this.guide.warn(element, `target:${targetName}`, `Please replace ${attributeName}=\"${identifier}.${targetName}\" with ${revisedAttributeName}=\"${targetName}\". ` +\n `The ${attributeName} attribute is deprecated and will be removed in a future version of Stimulus.`);\n }\n return element;\n }\n get guide() {\n return this.scope.guide;\n }\n}\n\nclass OutletSet {\n constructor(scope, controllerElement) {\n this.scope = scope;\n this.controllerElement = controllerElement;\n }\n get element() {\n return this.scope.element;\n }\n get identifier() {\n return this.scope.identifier;\n }\n get schema() {\n return this.scope.schema;\n }\n has(outletName) {\n return this.find(outletName) != null;\n }\n find(...outletNames) {\n return outletNames.reduce((outlet, outletName) => outlet || this.findOutlet(outletName), undefined);\n }\n findAll(...outletNames) {\n return outletNames.reduce((outlets, outletName) => [...outlets, ...this.findAllOutlets(outletName)], []);\n }\n getSelectorForOutletName(outletName) {\n const attributeName = this.schema.outletAttributeForScope(this.identifier, outletName);\n return this.controllerElement.getAttribute(attributeName);\n }\n findOutlet(outletName) {\n const selector = this.getSelectorForOutletName(outletName);\n if (selector)\n return this.findElement(selector, outletName);\n }\n findAllOutlets(outletName) {\n const selector = this.getSelectorForOutletName(outletName);\n return selector ? this.findAllElements(selector, outletName) : [];\n }\n findElement(selector, outletName) {\n const elements = this.scope.queryElements(selector);\n return elements.filter((element) => this.matchesElement(element, selector, outletName))[0];\n }\n findAllElements(selector, outletName) {\n const elements = this.scope.queryElements(selector);\n return elements.filter((element) => this.matchesElement(element, selector, outletName));\n }\n matchesElement(element, selector, outletName) {\n const controllerAttribute = element.getAttribute(this.scope.schema.controllerAttribute) || \"\";\n return element.matches(selector) && controllerAttribute.split(\" \").includes(outletName);\n }\n}\n\nclass Scope {\n constructor(schema, element, identifier, logger) {\n this.targets = new TargetSet(this);\n this.classes = new ClassMap(this);\n this.data = new DataMap(this);\n this.containsElement = (element) => {\n return element.closest(this.controllerSelector) === this.element;\n };\n this.schema = schema;\n this.element = element;\n this.identifier = identifier;\n this.guide = new Guide(logger);\n this.outlets = new OutletSet(this.documentScope, element);\n }\n findElement(selector) {\n return this.element.matches(selector) ? this.element : this.queryElements(selector).find(this.containsElement);\n }\n findAllElements(selector) {\n return [\n ...(this.element.matches(selector) ? [this.element] : []),\n ...this.queryElements(selector).filter(this.containsElement),\n ];\n }\n queryElements(selector) {\n return Array.from(this.element.querySelectorAll(selector));\n }\n get controllerSelector() {\n return attributeValueContainsToken(this.schema.controllerAttribute, this.identifier);\n }\n get isDocumentScope() {\n return this.element === document.documentElement;\n }\n get documentScope() {\n return this.isDocumentScope\n ? this\n : new Scope(this.schema, document.documentElement, this.identifier, this.guide.logger);\n }\n}\n\nclass ScopeObserver {\n constructor(element, schema, delegate) {\n this.element = element;\n this.schema = schema;\n this.delegate = delegate;\n this.valueListObserver = new ValueListObserver(this.element, this.controllerAttribute, this);\n this.scopesByIdentifierByElement = new WeakMap();\n this.scopeReferenceCounts = new WeakMap();\n }\n start() {\n this.valueListObserver.start();\n }\n stop() {\n this.valueListObserver.stop();\n }\n get controllerAttribute() {\n return this.schema.controllerAttribute;\n }\n parseValueForToken(token) {\n const { element, content: identifier } = token;\n return this.parseValueForElementAndIdentifier(element, identifier);\n }\n parseValueForElementAndIdentifier(element, identifier) {\n const scopesByIdentifier = this.fetchScopesByIdentifierForElement(element);\n let scope = scopesByIdentifier.get(identifier);\n if (!scope) {\n scope = this.delegate.createScopeForElementAndIdentifier(element, identifier);\n scopesByIdentifier.set(identifier, scope);\n }\n return scope;\n }\n elementMatchedValue(element, value) {\n const referenceCount = (this.scopeReferenceCounts.get(value) || 0) + 1;\n this.scopeReferenceCounts.set(value, referenceCount);\n if (referenceCount == 1) {\n this.delegate.scopeConnected(value);\n }\n }\n elementUnmatchedValue(element, value) {\n const referenceCount = this.scopeReferenceCounts.get(value);\n if (referenceCount) {\n this.scopeReferenceCounts.set(value, referenceCount - 1);\n if (referenceCount == 1) {\n this.delegate.scopeDisconnected(value);\n }\n }\n }\n fetchScopesByIdentifierForElement(element) {\n let scopesByIdentifier = this.scopesByIdentifierByElement.get(element);\n if (!scopesByIdentifier) {\n scopesByIdentifier = new Map();\n this.scopesByIdentifierByElement.set(element, scopesByIdentifier);\n }\n return scopesByIdentifier;\n }\n}\n\nclass Router {\n constructor(application) {\n this.application = application;\n this.scopeObserver = new ScopeObserver(this.element, this.schema, this);\n this.scopesByIdentifier = new Multimap();\n this.modulesByIdentifier = new Map();\n }\n get element() {\n return this.application.element;\n }\n get schema() {\n return this.application.schema;\n }\n get logger() {\n return this.application.logger;\n }\n get controllerAttribute() {\n return this.schema.controllerAttribute;\n }\n get modules() {\n return Array.from(this.modulesByIdentifier.values());\n }\n get contexts() {\n return this.modules.reduce((contexts, module) => contexts.concat(module.contexts), []);\n }\n start() {\n this.scopeObserver.start();\n }\n stop() {\n this.scopeObserver.stop();\n }\n loadDefinition(definition) {\n this.unloadIdentifier(definition.identifier);\n const module = new Module(this.application, definition);\n this.connectModule(module);\n const afterLoad = definition.controllerConstructor.afterLoad;\n if (afterLoad) {\n afterLoad.call(definition.controllerConstructor, definition.identifier, this.application);\n }\n }\n unloadIdentifier(identifier) {\n const module = this.modulesByIdentifier.get(identifier);\n if (module) {\n this.disconnectModule(module);\n }\n }\n getContextForElementAndIdentifier(element, identifier) {\n const module = this.modulesByIdentifier.get(identifier);\n if (module) {\n return module.contexts.find((context) => context.element == element);\n }\n }\n proposeToConnectScopeForElementAndIdentifier(element, identifier) {\n const scope = this.scopeObserver.parseValueForElementAndIdentifier(element, identifier);\n if (scope) {\n this.scopeObserver.elementMatchedValue(scope.element, scope);\n }\n else {\n console.error(`Couldn't find or create scope for identifier: \"${identifier}\" and element:`, element);\n }\n }\n handleError(error, message, detail) {\n this.application.handleError(error, message, detail);\n }\n createScopeForElementAndIdentifier(element, identifier) {\n return new Scope(this.schema, element, identifier, this.logger);\n }\n scopeConnected(scope) {\n this.scopesByIdentifier.add(scope.identifier, scope);\n const module = this.modulesByIdentifier.get(scope.identifier);\n if (module) {\n module.connectContextForScope(scope);\n }\n }\n scopeDisconnected(scope) {\n this.scopesByIdentifier.delete(scope.identifier, scope);\n const module = this.modulesByIdentifier.get(scope.identifier);\n if (module) {\n module.disconnectContextForScope(scope);\n }\n }\n connectModule(module) {\n this.modulesByIdentifier.set(module.identifier, module);\n const scopes = this.scopesByIdentifier.getValuesForKey(module.identifier);\n scopes.forEach((scope) => module.connectContextForScope(scope));\n }\n disconnectModule(module) {\n this.modulesByIdentifier.delete(module.identifier);\n const scopes = this.scopesByIdentifier.getValuesForKey(module.identifier);\n scopes.forEach((scope) => module.disconnectContextForScope(scope));\n }\n}\n\nconst defaultSchema = {\n controllerAttribute: \"data-controller\",\n actionAttribute: \"data-action\",\n targetAttribute: \"data-target\",\n targetAttributeForScope: (identifier) => `data-${identifier}-target`,\n outletAttributeForScope: (identifier, outlet) => `data-${identifier}-${outlet}-outlet`,\n keyMappings: Object.assign(Object.assign({ enter: \"Enter\", tab: \"Tab\", esc: \"Escape\", space: \" \", up: \"ArrowUp\", down: \"ArrowDown\", left: \"ArrowLeft\", right: \"ArrowRight\", home: \"Home\", end: \"End\", page_up: \"PageUp\", page_down: \"PageDown\" }, objectFromEntries(\"abcdefghijklmnopqrstuvwxyz\".split(\"\").map((c) => [c, c]))), objectFromEntries(\"0123456789\".split(\"\").map((n) => [n, n]))),\n};\nfunction objectFromEntries(array) {\n return array.reduce((memo, [k, v]) => (Object.assign(Object.assign({}, memo), { [k]: v })), {});\n}\n\nclass Application {\n constructor(element = document.documentElement, schema = defaultSchema) {\n this.logger = console;\n this.debug = false;\n this.logDebugActivity = (identifier, functionName, detail = {}) => {\n if (this.debug) {\n this.logFormattedMessage(identifier, functionName, detail);\n }\n };\n this.element = element;\n this.schema = schema;\n this.dispatcher = new Dispatcher(this);\n this.router = new Router(this);\n this.actionDescriptorFilters = Object.assign({}, defaultActionDescriptorFilters);\n }\n static start(element, schema) {\n const application = new this(element, schema);\n application.start();\n return application;\n }\n async start() {\n await domReady();\n this.logDebugActivity(\"application\", \"starting\");\n this.dispatcher.start();\n this.router.start();\n this.logDebugActivity(\"application\", \"start\");\n }\n stop() {\n this.logDebugActivity(\"application\", \"stopping\");\n this.dispatcher.stop();\n this.router.stop();\n this.logDebugActivity(\"application\", \"stop\");\n }\n register(identifier, controllerConstructor) {\n this.load({ identifier, controllerConstructor });\n }\n registerActionOption(name, filter) {\n this.actionDescriptorFilters[name] = filter;\n }\n load(head, ...rest) {\n const definitions = Array.isArray(head) ? head : [head, ...rest];\n definitions.forEach((definition) => {\n if (definition.controllerConstructor.shouldLoad) {\n this.router.loadDefinition(definition);\n }\n });\n }\n unload(head, ...rest) {\n const identifiers = Array.isArray(head) ? head : [head, ...rest];\n identifiers.forEach((identifier) => this.router.unloadIdentifier(identifier));\n }\n get controllers() {\n return this.router.contexts.map((context) => context.controller);\n }\n getControllerForElementAndIdentifier(element, identifier) {\n const context = this.router.getContextForElementAndIdentifier(element, identifier);\n return context ? context.controller : null;\n }\n handleError(error, message, detail) {\n var _a;\n this.logger.error(`%s\\n\\n%o\\n\\n%o`, message, error, detail);\n (_a = window.onerror) === null || _a === void 0 ? void 0 : _a.call(window, message, \"\", 0, 0, error);\n }\n logFormattedMessage(identifier, functionName, detail = {}) {\n detail = Object.assign({ application: this }, detail);\n this.logger.groupCollapsed(`${identifier} #${functionName}`);\n this.logger.log(\"details:\", Object.assign({}, detail));\n this.logger.groupEnd();\n }\n}\nfunction domReady() {\n return new Promise((resolve) => {\n if (document.readyState == \"loading\") {\n document.addEventListener(\"DOMContentLoaded\", () => resolve());\n }\n else {\n resolve();\n }\n });\n}\n\nfunction ClassPropertiesBlessing(constructor) {\n const classes = readInheritableStaticArrayValues(constructor, \"classes\");\n return classes.reduce((properties, classDefinition) => {\n return Object.assign(properties, propertiesForClassDefinition(classDefinition));\n }, {});\n}\nfunction propertiesForClassDefinition(key) {\n return {\n [`${key}Class`]: {\n get() {\n const { classes } = this;\n if (classes.has(key)) {\n return classes.get(key);\n }\n else {\n const attribute = classes.getAttributeName(key);\n throw new Error(`Missing attribute \"${attribute}\"`);\n }\n },\n },\n [`${key}Classes`]: {\n get() {\n return this.classes.getAll(key);\n },\n },\n [`has${capitalize(key)}Class`]: {\n get() {\n return this.classes.has(key);\n },\n },\n };\n}\n\nfunction OutletPropertiesBlessing(constructor) {\n const outlets = readInheritableStaticArrayValues(constructor, \"outlets\");\n return outlets.reduce((properties, outletDefinition) => {\n return Object.assign(properties, propertiesForOutletDefinition(outletDefinition));\n }, {});\n}\nfunction getOutletController(controller, element, identifier) {\n return controller.application.getControllerForElementAndIdentifier(element, identifier);\n}\nfunction getControllerAndEnsureConnectedScope(controller, element, outletName) {\n let outletController = getOutletController(controller, element, outletName);\n if (outletController)\n return outletController;\n controller.application.router.proposeToConnectScopeForElementAndIdentifier(element, outletName);\n outletController = getOutletController(controller, element, outletName);\n if (outletController)\n return outletController;\n}\nfunction propertiesForOutletDefinition(name) {\n const camelizedName = namespaceCamelize(name);\n return {\n [`${camelizedName}Outlet`]: {\n get() {\n const outletElement = this.outlets.find(name);\n const selector = this.outlets.getSelectorForOutletName(name);\n if (outletElement) {\n const outletController = getControllerAndEnsureConnectedScope(this, outletElement, name);\n if (outletController)\n return outletController;\n throw new Error(`The provided outlet element is missing an outlet controller \"${name}\" instance for host controller \"${this.identifier}\"`);\n }\n throw new Error(`Missing outlet element \"${name}\" for host controller \"${this.identifier}\". Stimulus couldn't find a matching outlet element using selector \"${selector}\".`);\n },\n },\n [`${camelizedName}Outlets`]: {\n get() {\n const outlets = this.outlets.findAll(name);\n if (outlets.length > 0) {\n return outlets\n .map((outletElement) => {\n const outletController = getControllerAndEnsureConnectedScope(this, outletElement, name);\n if (outletController)\n return outletController;\n console.warn(`The provided outlet element is missing an outlet controller \"${name}\" instance for host controller \"${this.identifier}\"`, outletElement);\n })\n .filter((controller) => controller);\n }\n return [];\n },\n },\n [`${camelizedName}OutletElement`]: {\n get() {\n const outletElement = this.outlets.find(name);\n const selector = this.outlets.getSelectorForOutletName(name);\n if (outletElement) {\n return outletElement;\n }\n else {\n throw new Error(`Missing outlet element \"${name}\" for host controller \"${this.identifier}\". Stimulus couldn't find a matching outlet element using selector \"${selector}\".`);\n }\n },\n },\n [`${camelizedName}OutletElements`]: {\n get() {\n return this.outlets.findAll(name);\n },\n },\n [`has${capitalize(camelizedName)}Outlet`]: {\n get() {\n return this.outlets.has(name);\n },\n },\n };\n}\n\nfunction TargetPropertiesBlessing(constructor) {\n const targets = readInheritableStaticArrayValues(constructor, \"targets\");\n return targets.reduce((properties, targetDefinition) => {\n return Object.assign(properties, propertiesForTargetDefinition(targetDefinition));\n }, {});\n}\nfunction propertiesForTargetDefinition(name) {\n return {\n [`${name}Target`]: {\n get() {\n const target = this.targets.find(name);\n if (target) {\n return target;\n }\n else {\n throw new Error(`Missing target element \"${name}\" for \"${this.identifier}\" controller`);\n }\n },\n },\n [`${name}Targets`]: {\n get() {\n return this.targets.findAll(name);\n },\n },\n [`has${capitalize(name)}Target`]: {\n get() {\n return this.targets.has(name);\n },\n },\n };\n}\n\nfunction ValuePropertiesBlessing(constructor) {\n const valueDefinitionPairs = readInheritableStaticObjectPairs(constructor, \"values\");\n const propertyDescriptorMap = {\n valueDescriptorMap: {\n get() {\n return valueDefinitionPairs.reduce((result, valueDefinitionPair) => {\n const valueDescriptor = parseValueDefinitionPair(valueDefinitionPair, this.identifier);\n const attributeName = this.data.getAttributeNameForKey(valueDescriptor.key);\n return Object.assign(result, { [attributeName]: valueDescriptor });\n }, {});\n },\n },\n };\n return valueDefinitionPairs.reduce((properties, valueDefinitionPair) => {\n return Object.assign(properties, propertiesForValueDefinitionPair(valueDefinitionPair));\n }, propertyDescriptorMap);\n}\nfunction propertiesForValueDefinitionPair(valueDefinitionPair, controller) {\n const definition = parseValueDefinitionPair(valueDefinitionPair, controller);\n const { key, name, reader: read, writer: write } = definition;\n return {\n [name]: {\n get() {\n const value = this.data.get(key);\n if (value !== null) {\n return read(value);\n }\n else {\n return definition.defaultValue;\n }\n },\n set(value) {\n if (value === undefined) {\n this.data.delete(key);\n }\n else {\n this.data.set(key, write(value));\n }\n },\n },\n [`has${capitalize(name)}`]: {\n get() {\n return this.data.has(key) || definition.hasCustomDefaultValue;\n },\n },\n };\n}\nfunction parseValueDefinitionPair([token, typeDefinition], controller) {\n return valueDescriptorForTokenAndTypeDefinition({\n controller,\n token,\n typeDefinition,\n });\n}\nfunction parseValueTypeConstant(constant) {\n switch (constant) {\n case Array:\n return \"array\";\n case Boolean:\n return \"boolean\";\n case Number:\n return \"number\";\n case Object:\n return \"object\";\n case String:\n return \"string\";\n }\n}\nfunction parseValueTypeDefault(defaultValue) {\n switch (typeof defaultValue) {\n case \"boolean\":\n return \"boolean\";\n case \"number\":\n return \"number\";\n case \"string\":\n return \"string\";\n }\n if (Array.isArray(defaultValue))\n return \"array\";\n if (Object.prototype.toString.call(defaultValue) === \"[object Object]\")\n return \"object\";\n}\nfunction parseValueTypeObject(payload) {\n const { controller, token, typeObject } = payload;\n const hasType = isSomething(typeObject.type);\n const hasDefault = isSomething(typeObject.default);\n const fullObject = hasType && hasDefault;\n const onlyType = hasType && !hasDefault;\n const onlyDefault = !hasType && hasDefault;\n const typeFromObject = parseValueTypeConstant(typeObject.type);\n const typeFromDefaultValue = parseValueTypeDefault(payload.typeObject.default);\n if (onlyType)\n return typeFromObject;\n if (onlyDefault)\n return typeFromDefaultValue;\n if (typeFromObject !== typeFromDefaultValue) {\n const propertyPath = controller ? `${controller}.${token}` : token;\n throw new Error(`The specified default value for the Stimulus Value \"${propertyPath}\" must match the defined type \"${typeFromObject}\". The provided default value of \"${typeObject.default}\" is of type \"${typeFromDefaultValue}\".`);\n }\n if (fullObject)\n return typeFromObject;\n}\nfunction parseValueTypeDefinition(payload) {\n const { controller, token, typeDefinition } = payload;\n const typeObject = { controller, token, typeObject: typeDefinition };\n const typeFromObject = parseValueTypeObject(typeObject);\n const typeFromDefaultValue = parseValueTypeDefault(typeDefinition);\n const typeFromConstant = parseValueTypeConstant(typeDefinition);\n const type = typeFromObject || typeFromDefaultValue || typeFromConstant;\n if (type)\n return type;\n const propertyPath = controller ? `${controller}.${typeDefinition}` : token;\n throw new Error(`Unknown value type \"${propertyPath}\" for \"${token}\" value`);\n}\nfunction defaultValueForDefinition(typeDefinition) {\n const constant = parseValueTypeConstant(typeDefinition);\n if (constant)\n return defaultValuesByType[constant];\n const hasDefault = hasProperty(typeDefinition, \"default\");\n const hasType = hasProperty(typeDefinition, \"type\");\n const typeObject = typeDefinition;\n if (hasDefault)\n return typeObject.default;\n if (hasType) {\n const { type } = typeObject;\n const constantFromType = parseValueTypeConstant(type);\n if (constantFromType)\n return defaultValuesByType[constantFromType];\n }\n return typeDefinition;\n}\nfunction valueDescriptorForTokenAndTypeDefinition(payload) {\n const { token, typeDefinition } = payload;\n const key = `${dasherize(token)}-value`;\n const type = parseValueTypeDefinition(payload);\n return {\n type,\n key,\n name: camelize(key),\n get defaultValue() {\n return defaultValueForDefinition(typeDefinition);\n },\n get hasCustomDefaultValue() {\n return parseValueTypeDefault(typeDefinition) !== undefined;\n },\n reader: readers[type],\n writer: writers[type] || writers.default,\n };\n}\nconst defaultValuesByType = {\n get array() {\n return [];\n },\n boolean: false,\n number: 0,\n get object() {\n return {};\n },\n string: \"\",\n};\nconst readers = {\n array(value) {\n const array = JSON.parse(value);\n if (!Array.isArray(array)) {\n throw new TypeError(`expected value of type \"array\" but instead got value \"${value}\" of type \"${parseValueTypeDefault(array)}\"`);\n }\n return array;\n },\n boolean(value) {\n return !(value == \"0\" || String(value).toLowerCase() == \"false\");\n },\n number(value) {\n return Number(value.replace(/_/g, \"\"));\n },\n object(value) {\n const object = JSON.parse(value);\n if (object === null || typeof object != \"object\" || Array.isArray(object)) {\n throw new TypeError(`expected value of type \"object\" but instead got value \"${value}\" of type \"${parseValueTypeDefault(object)}\"`);\n }\n return object;\n },\n string(value) {\n return value;\n },\n};\nconst writers = {\n default: writeString,\n array: writeJSON,\n object: writeJSON,\n};\nfunction writeJSON(value) {\n return JSON.stringify(value);\n}\nfunction writeString(value) {\n return `${value}`;\n}\n\nclass Controller {\n constructor(context) {\n this.context = context;\n }\n static get shouldLoad() {\n return true;\n }\n static afterLoad(_identifier, _application) {\n return;\n }\n get application() {\n return this.context.application;\n }\n get scope() {\n return this.context.scope;\n }\n get element() {\n return this.scope.element;\n }\n get identifier() {\n return this.scope.identifier;\n }\n get targets() {\n return this.scope.targets;\n }\n get outlets() {\n return this.scope.outlets;\n }\n get classes() {\n return this.scope.classes;\n }\n get data() {\n return this.scope.data;\n }\n initialize() {\n }\n connect() {\n }\n disconnect() {\n }\n dispatch(eventName, { target = this.element, detail = {}, prefix = this.identifier, bubbles = true, cancelable = true, } = {}) {\n const type = prefix ? `${prefix}:${eventName}` : eventName;\n const event = new CustomEvent(type, { detail, bubbles, cancelable });\n target.dispatchEvent(event);\n return event;\n }\n}\nController.blessings = [\n ClassPropertiesBlessing,\n TargetPropertiesBlessing,\n ValuePropertiesBlessing,\n OutletPropertiesBlessing,\n];\nController.targets = [];\nController.outlets = [];\nController.values = {};\n\nexport { Application, AttributeObserver, Context, Controller, ElementObserver, IndexedMultimap, Multimap, SelectorObserver, StringMapObserver, TokenListObserver, ValueListObserver, add, defaultSchema, del, fetch, prune };\n","import { Controller } from \"@hotwired/stimulus\"\n\nexport default class extends Controller {\n connect() {\n this.element.querySelectorAll(\"[data-accordion-trigger]\").forEach((trigger) => {\n trigger.addEventListener(\"click\", this.toggle.bind(this))\n })\n }\n\n toggle(event) {\n const item = event.currentTarget.closest(\".Orbital-Accordion-Item\")\n if (!item) return\n\n const content = item.querySelector(\".Orbital-Accordion-Item-Content\")\n if (!content) return\n\n const isOpen = content.dataset.state === \"open\"\n\n if (isOpen) {\n content.style.height = `${content.scrollHeight}px`\n content.offsetHeight // force reflow\n content.style.height = \"0px\"\n content.addEventListener(\n \"transitionend\",\n () => {\n content.dataset.state = \"closed\"\n content.style.height = \"\"\n },\n { once: true },\n )\n } else {\n content.dataset.state = \"open\"\n content.style.height = \"0px\"\n content.offsetHeight // force reflow\n content.style.height = `${content.scrollHeight}px`\n content.addEventListener(\n \"transitionend\",\n () => {\n content.style.height = \"\"\n },\n { once: true },\n )\n }\n }\n}\n","import { Controller } from \"@hotwired/stimulus\"\n\nexport default class extends Controller {\n static targets = [\"image\", \"fallback\"]\n\n imageError() {\n if (this.hasImageTarget) this.imageTarget.style.display = \"none\"\n if (this.hasFallbackTarget) this.fallbackTarget.style.display = \"flex\"\n }\n}\n","import { Controller } from \"@hotwired/stimulus\"\n\n// Connects to data-controller=\"orbital-menu\"\nexport default class extends Controller {\n static targets = [\"item\"]\n\n connect() {\n this.currentIndex = -1\n }\n\n handleKeydown(event) {\n const items = this.getEnabledItems()\n if (items.length === 0) return\n\n switch (event.key) {\n case \"ArrowDown\":\n event.preventDefault()\n this.focusNext(items)\n break\n case \"ArrowUp\":\n event.preventDefault()\n this.focusPrevious(items)\n break\n case \"Home\":\n event.preventDefault()\n this.focusFirst(items)\n break\n case \"End\":\n event.preventDefault()\n this.focusLast(items)\n break\n case \"ArrowRight\":\n if (event.target.hasAttribute(\"aria-haspopup\")) {\n event.preventDefault()\n this.activateItem(event.target)\n }\n break\n case \"Enter\":\n case \" \": // Space\n event.preventDefault()\n this.activateItem(event.target)\n break\n case \"Escape\":\n event.preventDefault()\n this.closeMenu()\n break\n default:\n // Type-ahead: focus item starting with pressed key\n if (event.key.length === 1 && /^[a-z0-9]$/i.test(event.key)) {\n this.focusItemStartingWith(items, event.key)\n }\n }\n }\n\n getEnabledItems() {\n const items = []\n for (const child of this.element.children) {\n if (\n child.getAttribute(\"role\") === \"menuitem\" &&\n !child.hasAttribute(\"data-disabled\") &&\n child.getAttribute(\"aria-disabled\") !== \"true\"\n ) {\n items.push(child)\n } else if (child.classList.contains(\"Orbital-Menu-Sub\")) {\n const trigger = child.querySelector(\":scope > .Orbital-Menu-Sub-Trigger\")\n if (trigger) items.push(trigger)\n }\n }\n return items\n }\n\n focusNext(items) {\n const active = items.indexOf(document.activeElement)\n this.currentIndex = active < items.length - 1 ? active + 1 : 0\n this.updateFocus(items)\n }\n\n focusPrevious(items) {\n const active = items.indexOf(document.activeElement)\n this.currentIndex = active > 0 ? active - 1 : items.length - 1\n this.updateFocus(items)\n }\n\n focusFirst(items) {\n this.currentIndex = 0\n this.updateFocus(items)\n }\n\n focusLast(items) {\n this.currentIndex = items.length - 1\n this.updateFocus(items)\n }\n\n updateFocus(items = null) {\n const enabledItems = items || this.getEnabledItems()\n if (enabledItems.length === 0) return\n\n // Ensure currentIndex is valid\n this.currentIndex = Math.max(0, Math.min(this.currentIndex, enabledItems.length - 1))\n\n // Update tabindex for roving tabindex pattern\n enabledItems.forEach((item, index) => {\n if (index === this.currentIndex) {\n item.setAttribute(\"tabindex\", \"0\")\n item.focus()\n } else {\n item.setAttribute(\"tabindex\", \"-1\")\n }\n })\n }\n\n activateItem(item) {\n // Check if it's a submenu trigger\n if (item.hasAttribute(\"aria-haspopup\")) {\n const subController = this.application.getControllerForElementAndIdentifier(\n item.closest('[data-controller*=\"orbital-menu-sub\"]'),\n \"orbital-menu-sub\",\n )\n if (subController) {\n subController.toggle()\n }\n } else {\n // Activate the menu item (trigger click)\n item.click()\n }\n }\n\n focusItemStartingWith(items, key) {\n const lowerKey = key.toLowerCase()\n const startIndex = (this.currentIndex + 1) % items.length\n\n // Search from current position forward\n for (let i = 0; i < items.length; i++) {\n const index = (startIndex + i) % items.length\n const item = items[index]\n const text = item.textContent.trim().toLowerCase()\n\n if (text.startsWith(lowerKey)) {\n this.currentIndex = index\n this.updateFocus(items)\n return\n }\n }\n }\n\n closeMenu() {\n // If inside a popover, close it\n const popover = this.element.closest(\"[popover]\")\n if (popover) {\n popover.hidePopover()\n }\n\n // If inside a submenu, close it\n const submenu = this.element.closest(\".Orbital-Menu-Sub\")\n if (submenu) {\n const subController = this.application.getControllerForElementAndIdentifier(submenu, \"orbital-menu-sub\")\n if (subController) {\n subController.close()\n }\n }\n }\n}\n","import { Controller } from \"@hotwired/stimulus\"\n\n// Connects to data-controller=\"orbital-menu-sub\"\nexport default class extends Controller {\n static targets = [\"trigger\", \"content\"]\n\n connect() {\n this._onClickOutside = (e) => {\n if (this.element.getAttribute(\"data-state\") === \"open\" && !this.element.contains(e.target)) {\n this.close(false)\n }\n }\n }\n\n disconnect() {\n document.removeEventListener(\"click\", this._onClickOutside)\n }\n\n toggle() {\n const isOpen = this.element.getAttribute(\"data-state\") === \"open\"\n if (isOpen) {\n this.close()\n } else {\n this.open()\n }\n }\n\n open() {\n this.element.setAttribute(\"data-state\", \"open\")\n this.triggerTarget.setAttribute(\"aria-expanded\", \"true\")\n document.addEventListener(\"click\", this._onClickOutside)\n\n requestAnimationFrame(() => {\n const firstItem = this.contentTarget.querySelector('[role=\"menuitem\"]')\n if (firstItem) firstItem.focus()\n })\n }\n\n close(refocus = true) {\n this.element.setAttribute(\"data-state\", \"closed\")\n this.triggerTarget.setAttribute(\"aria-expanded\", \"false\")\n document.removeEventListener(\"click\", this._onClickOutside)\n\n if (refocus) this.triggerTarget.focus()\n }\n\n handleKeydown(event) {\n const items = [...this.contentTarget.querySelectorAll('[role=\"menuitem\"]:not([aria-disabled=\"true\"])')]\n if (!items.length) return\n\n const current = items.indexOf(document.activeElement)\n\n switch (event.key) {\n case \"ArrowDown\":\n event.preventDefault()\n event.stopPropagation()\n items[current < items.length - 1 ? current + 1 : 0].focus()\n break\n case \"ArrowUp\":\n event.preventDefault()\n event.stopPropagation()\n items[current > 0 ? current - 1 : items.length - 1].focus()\n break\n case \"ArrowLeft\":\n case \"Escape\":\n event.preventDefault()\n event.stopPropagation()\n this.close()\n break\n case \"Enter\":\n case \" \":\n event.stopPropagation()\n break\n }\n }\n}\n","import { Controller } from \"@hotwired/stimulus\"\n\nexport default class extends Controller {\n static values = {\n open: { type: Boolean, default: false },\n dismissible: { type: Boolean, default: true },\n }\n\n static targets = [\"panel\"]\n\n connect() {\n this._handleKeydown = this.handleKeydown.bind(this)\n this._previouslyFocused = null\n this._originalStyles = null\n this._scrollY = 0\n\n if (this.openValue) {\n requestAnimationFrame(() => this.show())\n }\n }\n\n disconnect() {\n this._restoreScrollLock()\n document.removeEventListener(\"keydown\", this._handleKeydown)\n }\n\n show() {\n if (this.element.dataset.state === \"open\") return\n\n this._previouslyFocused = document.activeElement\n this.element.setAttribute(\"data-state\", \"open\")\n this._applyScrollLock()\n document.addEventListener(\"keydown\", this._handleKeydown)\n\n requestAnimationFrame(() => this._focusFirst())\n\n this.element.dispatchEvent(new CustomEvent(\"orbital:modal:open\", { bubbles: true }))\n }\n\n close() {\n if (this.element.dataset.state === \"closed\") return\n\n this.element.setAttribute(\"data-state\", \"closed\")\n this._restoreScrollLock()\n document.removeEventListener(\"keydown\", this._handleKeydown)\n\n if (this._previouslyFocused && typeof this._previouslyFocused.focus === \"function\") {\n this._previouslyFocused.focus()\n this._previouslyFocused = null\n }\n\n this.element.dispatchEvent(new CustomEvent(\"orbital:modal:close\", { bubbles: true }))\n\n this._clearTurboFrame()\n }\n\n backdropClick(event) {\n if (event.target === event.currentTarget && this.dismissibleValue) {\n this.close()\n }\n }\n\n handleKeydown(event) {\n if (event.key === \"Escape\") {\n event.preventDefault()\n event.stopPropagation()\n if (this.dismissibleValue) {\n this.close()\n }\n return\n }\n\n if (event.key === \"Tab\") {\n this._trapFocus(event)\n }\n }\n\n _applyScrollLock() {\n if (document.body.dataset.orbitalScrollLocked) return\n\n this._scrollY = window.scrollY\n const htmlStyle = getComputedStyle(document.documentElement)\n const hasStableGutter = htmlStyle.scrollbarGutter?.includes(\"stable\")\n\n this._originalStyles = {\n overflow: document.body.style.overflow,\n paddingRight: document.body.style.paddingRight,\n }\n document.body.style.overflow = \"hidden\"\n if (!hasStableGutter) {\n const scrollbarWidth = window.innerWidth - document.documentElement.clientWidth\n if (scrollbarWidth > 0) {\n document.body.style.paddingRight = `${scrollbarWidth}px`\n }\n }\n document.body.dataset.orbitalScrollLocked = \"true\"\n }\n\n _restoreScrollLock() {\n if (!this._originalStyles) return\n\n document.body.style.overflow = this._originalStyles.overflow\n document.body.style.paddingRight = this._originalStyles.paddingRight\n delete document.body.dataset.orbitalScrollLocked\n this._originalStyles = null\n }\n\n _focusableElements() {\n if (!this.hasPanelTarget) return []\n const selector = [\n \"a[href]\",\n \"button:not([disabled])\",\n \"input:not([disabled]):not([type='hidden'])\",\n \"select:not([disabled])\",\n \"textarea:not([disabled])\",\n \"[tabindex]:not([tabindex='-1'])\",\n \"[contenteditable]\",\n ].join(\", \")\n return [...this.panelTarget.querySelectorAll(selector)].filter(\n (el) => !el.closest(\"[hidden]\") && !el.closest(\"[aria-hidden='true']\"),\n )\n }\n\n _focusFirst() {\n const focusable = this._focusableElements()\n if (focusable.length > 0) {\n focusable[0].focus({ preventScroll: true })\n } else if (this.hasPanelTarget) {\n this.panelTarget.setAttribute(\"tabindex\", \"-1\")\n this.panelTarget.focus({ preventScroll: true })\n }\n }\n\n _trapFocus(event) {\n const focusable = this._focusableElements()\n if (focusable.length === 0) return\n\n const first = focusable[0]\n const last = focusable[focusable.length - 1]\n\n if (event.shiftKey) {\n if (document.activeElement === first) {\n event.preventDefault()\n last.focus({ preventScroll: true })\n }\n } else {\n if (document.activeElement === last) {\n event.preventDefault()\n first.focus({ preventScroll: true })\n }\n }\n }\n\n _clearTurboFrame() {\n const frame = this.element.closest(\"turbo-frame\")\n if (frame) {\n frame.innerHTML = \"\"\n frame.removeAttribute(\"src\")\n frame.removeAttribute(\"complete\")\n }\n }\n}\n","import { autoPlacement, computePosition, flip, offset, shift } from \"@floating-ui/dom\"\nimport { Controller } from \"@hotwired/stimulus\"\n\n// Connects to data-controller=\"orbital-popover\"\nexport default class extends Controller {\n static values = {\n trigger: { type: String, default: \"click\" }, // \"click\" or \"hover\"\n position: { type: String, default: \"auto\" },\n showDelay: { type: Number, default: 0 },\n hideDelay: { type: Number, default: 100 },\n }\n\n static targets = [\"trigger\", \"content\"]\n\n connect() {\n this.boundShow = this.show.bind(this)\n this.boundHide = this.hide.bind(this)\n this.boundDelayedHide = this.delayedHide.bind(this)\n this.boundUpdatePosition = this.updatePosition.bind(this)\n this.boundOnNativeToggle = this.onNativeToggle.bind(this)\n this.hideTimeout = null\n\n // Set up trigger based on type\n if (this.triggerValue === \"hover\") {\n this.setupHoverTrigger()\n } else {\n this.setupClickTrigger()\n }\n\n // Sync data-state when the native popover API light-dismisses\n if (this.hasContentTarget) {\n this.contentTarget.addEventListener(\"toggle\", this.boundOnNativeToggle)\n }\n }\n\n disconnect() {\n this.teardownTrigger()\n this.teardownPositioning()\n this.cancelShowTimeout()\n if (this.hideTimeout) {\n clearTimeout(this.hideTimeout)\n }\n if (this.hasContentTarget) {\n this.contentTarget.removeEventListener(\"toggle\", this.boundOnNativeToggle)\n }\n }\n\n onNativeToggle(event) {\n if (event.newState === \"closed\" && this.element.getAttribute(\"data-state\") === \"open\") {\n this.element.setAttribute(\"data-state\", \"closed\")\n this.contentTarget.removeAttribute(\"data-positioned\")\n this.teardownPositioning()\n }\n }\n\n // Actions\n async show() {\n if (this.hideTimeout) {\n clearTimeout(this.hideTimeout)\n this.hideTimeout = null\n }\n\n if (this.element.getAttribute(\"data-state\") === \"open\") return\n\n if (this.hasContentTarget) {\n try {\n // Show popover invisibly first (CSS gate hides it until data-positioned is set)\n this.contentTarget.removeAttribute(\"data-positioned\")\n this.contentTarget.showPopover()\n this.element.setAttribute(\"data-state\", \"open\")\n\n // Now calculate position with the element visible and measurable\n const { x, y, placement } = await this.calculatePosition()\n this.contentTarget.style.left = `${x}px`\n this.contentTarget.style.top = `${y}px`\n this.contentTarget.dataset.placement = placement\n\n // Reveal at the correct position\n this.contentTarget.setAttribute(\"data-positioned\", \"true\")\n\n this.setupPositioning()\n\n this.element.dispatchEvent(\n new CustomEvent(\"orbital:popover:shown\", {\n bubbles: true,\n detail: { popover: this.contentTarget },\n }),\n )\n } catch (e) {\n // Popover API not supported, fallback gracefully\n console.warn(\"Popover API not supported:\", e)\n }\n }\n }\n\n hide() {\n if (this.hasContentTarget) {\n try {\n this.contentTarget.hidePopover()\n this.element.setAttribute(\"data-state\", \"closed\")\n\n // Clear positioned flag for next open\n this.contentTarget.removeAttribute(\"data-positioned\")\n\n // Clean up positioning listeners\n this.teardownPositioning()\n\n // Dispatch custom event\n this.element.dispatchEvent(\n new CustomEvent(\"orbital:popover:hidden\", {\n bubbles: true,\n detail: { popover: this.contentTarget },\n }),\n )\n } catch (e) {\n // Popover API not supported, fallback gracefully\n console.warn(\"Popover API not supported:\", e)\n }\n }\n }\n\n delayedHide() {\n if (this.hideDelayValue === 0) {\n this.hide()\n return\n }\n this.hideTimeout = setTimeout(() => {\n this.hide()\n }, this.hideDelayValue)\n }\n\n async toggle() {\n if (this.hasContentTarget) {\n try {\n const isOpen = this.element.getAttribute(\"data-state\") === \"open\"\n\n if (isOpen) {\n this.contentTarget.hidePopover()\n this.element.setAttribute(\"data-state\", \"closed\")\n this.contentTarget.removeAttribute(\"data-positioned\")\n this.teardownPositioning()\n } else {\n this.contentTarget.removeAttribute(\"data-positioned\")\n this.contentTarget.showPopover()\n this.element.setAttribute(\"data-state\", \"open\")\n\n const { x, y, placement } = await this.calculatePosition()\n this.contentTarget.style.left = `${x}px`\n this.contentTarget.style.top = `${y}px`\n this.contentTarget.dataset.placement = placement\n\n this.contentTarget.setAttribute(\"data-positioned\", \"true\")\n this.setupPositioning()\n }\n } catch (e) {\n // Popover API not supported, fallback gracefully\n console.warn(\"Popover API not supported:\", e)\n }\n }\n }\n\n static COMPASS_TO_PLACEMENT = {\n n: \"top\",\n ne: \"top-end\",\n e: \"right\",\n se: \"bottom-end\",\n s: \"bottom\",\n sw: \"bottom-start\",\n w: \"left\",\n nw: \"top-start\",\n }\n\n // Calculate position without applying it (for pre-positioning)\n async calculatePosition() {\n if (!this.hasTriggerTarget || !this.hasContentTarget) {\n return { x: 0, y: 0, placement: \"bottom\" }\n }\n\n const referenceEl = this.triggerTarget\n const floatingEl = this.contentTarget\n\n let middleware, placement\n\n if (this.positionValue === \"auto\") {\n middleware = [offset(8), autoPlacement(), shift({ padding: 8 })]\n } else {\n placement = this.constructor.COMPASS_TO_PLACEMENT[this.positionValue] || this.positionValue\n middleware = [offset(8), flip(), shift({ padding: 8 })]\n }\n\n try {\n const result = await computePosition(referenceEl, floatingEl, {\n placement,\n middleware,\n })\n\n return {\n x: result.x,\n y: result.y,\n placement: result.placement || placement || \"bottom\",\n }\n } catch (e) {\n console.warn(\"Failed to compute position:\", e)\n return { x: 0, y: 0, placement: \"bottom\" }\n }\n }\n\n // Apply position and placement data attribute\n async updatePosition() {\n const { x, y, placement } = await this.calculatePosition()\n\n if (this.hasContentTarget) {\n Object.assign(this.contentTarget.style, {\n left: `${x}px`,\n top: `${y}px`,\n })\n this.contentTarget.dataset.placement = placement\n }\n }\n\n setupPositioning() {\n // Reposition on scroll and resize\n window.addEventListener(\"scroll\", this.boundUpdatePosition, true)\n window.addEventListener(\"resize\", this.boundUpdatePosition)\n }\n\n teardownPositioning() {\n window.removeEventListener(\"scroll\", this.boundUpdatePosition, true)\n window.removeEventListener(\"resize\", this.boundUpdatePosition)\n }\n\n // Lifecycle callback when position value changes\n positionValueChanged() {\n // Reposition if popover is currently open\n if (this.element.getAttribute(\"data-state\") === \"open\") {\n this.updatePosition()\n }\n }\n\n // Private methods\n setupHoverTrigger() {\n this.boundCancelHide = () => {\n if (this.hideTimeout) {\n clearTimeout(this.hideTimeout)\n this.hideTimeout = null\n }\n }\n\n this.boundDelayedShow = () => {\n this.cancelShowTimeout()\n if (this.showDelayValue === 0) {\n this.show()\n } else {\n this.showTimeout = setTimeout(() => this.show(), this.showDelayValue)\n }\n }\n\n this.boundCancelShow = () => {\n this.cancelShowTimeout()\n }\n\n if (this.hasTriggerTarget) {\n this.triggerTarget.addEventListener(\"mouseenter\", this.boundDelayedShow)\n this.triggerTarget.addEventListener(\"mouseleave\", this.boundDelayedHide)\n this.triggerTarget.addEventListener(\"mouseleave\", this.boundCancelShow)\n }\n\n if (this.hasContentTarget) {\n this.contentTarget.addEventListener(\"mouseenter\", this.boundCancelHide)\n this.contentTarget.addEventListener(\"mouseleave\", this.boundDelayedHide)\n }\n }\n\n cancelShowTimeout() {\n if (this.showTimeout) {\n clearTimeout(this.showTimeout)\n this.showTimeout = null\n }\n }\n\n setupClickTrigger() {\n if (this.hasTriggerTarget) {\n this.triggerTarget.addEventListener(\"click\", this.handleClick.bind(this))\n }\n }\n\n teardownTrigger() {\n if (this.hasTriggerTarget) {\n this.triggerTarget.removeEventListener(\"mouseenter\", this.boundDelayedShow)\n this.triggerTarget.removeEventListener(\"mouseleave\", this.boundDelayedHide)\n this.triggerTarget.removeEventListener(\"mouseleave\", this.boundCancelShow)\n this.triggerTarget.removeEventListener(\"click\", this.handleClick.bind(this))\n }\n\n if (this.hasContentTarget) {\n this.contentTarget.removeEventListener(\"mouseenter\", this.boundCancelHide)\n this.contentTarget.removeEventListener(\"mouseleave\", this.boundDelayedHide)\n }\n }\n\n handleClick(event) {\n if (!this.hasContentTarget) return\n\n // Don't open if the trigger (or a button inside it) is disabled\n if (\n this.triggerTarget.closest('[data-disabled=\"true\"]') ||\n this.triggerTarget.querySelector('[data-disabled=\"true\"], [disabled], [aria-disabled=\"true\"]')\n )\n return\n\n event.preventDefault()\n this.toggle()\n }\n\n async handleToggle(event) {\n const state = event.newState // \"open\" or \"closed\"\n this.element.setAttribute(\"data-state\", state)\n\n // Update position when opened via native toggle event\n if (state === \"open\") {\n // Clear positioned flag during position calculation\n this.contentTarget.removeAttribute(\"data-positioned\")\n\n // Position immediately (popover is already shown by native API)\n const { x, y, placement } = await this.calculatePosition()\n this.contentTarget.style.left = `${x}px`\n this.contentTarget.style.top = `${y}px`\n this.contentTarget.dataset.placement = placement\n\n // Mark as positioned to trigger CSS visibility\n this.contentTarget.setAttribute(\"data-positioned\", \"true\")\n\n this.setupPositioning()\n\n // Focus first focusable item inside the popover (e.g. menu item)\n requestAnimationFrame(() => {\n const firstItem = this.contentTarget.querySelector('[role=\"menuitem\"]:not([aria-disabled=\"true\"])')\n if (firstItem) firstItem.focus()\n })\n } else {\n this.teardownPositioning()\n }\n\n // Dispatch custom event\n const eventName = state === \"open\" ? \"orbital:popover:shown\" : \"orbital:popover:hidden\"\n this.element.dispatchEvent(\n new CustomEvent(eventName, {\n bubbles: true,\n detail: { popover: this.contentTarget },\n }),\n )\n }\n}\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 return !!floatingOffsetParent && isFixed && floatingOffsetParent === getWindow(element);\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 && offsetParent) {\n const win = getWindow(domElement);\n const offsetWin = isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;\n let currentWin = win;\n let currentIFrame = getFrameElement(currentWin);\n while (currentIFrame && 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 || !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 element.getClientRects ? 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(html) {\n const scroll = getNodeScroll(html);\n const body = html.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(html);\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, rootBoundary) {\n if (rootBoundary === void 0) {\n rootBoundary = 'viewport';\n }\n const isLayoutViewport = rootBoundary === 'layoutViewport';\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 // Client coordinates are relative to the layout viewport, except in\n // WebKit with an `absolute` strategy, where they are relative to the\n // visual viewport.\n const layoutRelativeClientCoords = !isWebKit() || strategy === 'fixed';\n if (isLayoutViewport) {\n if (!layoutRelativeClientCoords) {\n x = -visualViewport.offsetLeft;\n y = -visualViewport.offsetTop;\n }\n } else {\n width = visualViewport.width;\n height = visualViewport.height;\n if (layoutRelativeClientCoords) {\n x = visualViewport.offsetLeft;\n y = visualViewport.offsetTop;\n }\n }\n }\n const windowScrollbarX = getWindowScrollBarX(html);\n // `scrollbar-gutter: stable` on the <html> reserves gutter space that shrinks\n // the visual width but isn't reflected in `html.clientWidth`, so subtract it.\n // Only the inline-end (right) gutter can hold the scrollbar; `both-edges` also\n // reserves an empty inline-start gutter that clips nothing, so exclude just\n // the one scrollbar-side gutter — halve the measured (two-gutter) total. A\n // left-side scrollbar (`windowScrollbarX > 0`) is already handled by\n // `getHTMLOffset`/`visualViewport.width`; skip it here.\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 reservedWidth = Math.abs(html.clientWidth - body.clientWidth - bodyMarginInline);\n const gutter = getComputedStyle(html).scrollbarGutter === 'stable both-edges' ? reservedWidth / 2 : reservedWidth;\n if (gutter <= SCROLLBAR_MAX) {\n width -= gutter;\n }\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 = getScale(element);\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' || clippingAncestor === 'layoutViewport') {\n rect = getViewportRect(element, strategy, clippingAncestor);\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}\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 lastKeptComputedStyle = 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 // Position of the containing block chain below the current node. A fixed\n // element whose containing block hasn't been found yet is a fixed chain.\n const lastPosition = lastKeptComputedStyle ? lastKeptComputedStyle.position : elementIsFixed ? 'fixed' : '';\n\n // A non-containing ancestor does not clip the element when the chain\n // below it escapes it: a fixed chain escapes all ancestors up to the\n // next containing block, an absolute chain escapes static ancestors.\n const shouldDropCurrentNode = !currentNodeIsContaining && (lastPosition === 'fixed' || lastPosition === 'absolute' && computedStyle.position === 'static');\n if (shouldDropCurrentNode) {\n // Drop non-containing blocks.\n result = result.filter(ancestor => ancestor !== currentNode);\n } else {\n // The kept node carries the chain position for the next iteration.\n lastKeptComputedStyle = 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 if (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 }\n }\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 if (!isOffsetParentAnElement && documentElement) {\n offsets.x = getWindowScrollBarX(documentElement);\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, ancestorResize) {\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\n // The entry is a snapshot, so the reference may have moved since the\n // intersection was computed (under performance constraints, or between\n // consecutive frames of a multi-frame layout shift). The reported ratio\n // and the observed area are stale in that case and cannot be trusted to\n // detect subsequent movement, so refresh regardless of the ratio.\n if (!rectsAreEqual(elementRectForRootMargin, element.getBoundingClientRect())) {\n return refresh();\n }\n if (ratio !== threshold) {\n if (!isFirstUpdate) {\n return refresh();\n }\n if (!ratio) {\n // If the reference is clipped in place, the ratio is 0. Throttle\n // the refresh 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 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 const win = getWindow(element);\n // The window is a resize ancestor, so when `ancestorResize` is enabled its\n // listener already runs the update on resize. Here we only need to rebuild\n // the `IntersectionObserver` for the new root size, skipping a redundant\n // update. When `ancestorResize` is disabled, this becomes the sole update.\n const handleResize = () => refresh(ancestorResize);\n win.addEventListener('resize', handleResize);\n refresh(true);\n return () => {\n win.removeEventListener('resize', handleResize);\n cleanup();\n };\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 ancestorResize && ancestor.addEventListener('resize', update);\n });\n const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl, update, ancestorResize) : 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 = options != null ? options : {};\n const platformWithCache = {\n ...platform,\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","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 const alignment = getAlignment(placement);\n if (alignment) {\n coords[alignmentAxis] += commonAlign * (alignment === 'end' ? 1 : -1) * (rtl && isVertical ? -1 : 1);\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 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 max = clientSize - arrowDimensions[length] - maxPadding;\n const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;\n const offset = clamp(minPadding, 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 < minPadding ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0;\n const alignmentOffset = shouldAddOffset ? center < minPadding ? center - minPadding : 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 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\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 overflow = await platform.detectOverflow(state, detectOverflowOptions);\n const alignmentSides = getAlignmentSides(currentPlacement, rects, await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating)));\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\n // No rects (e.g. a hidden or detached reference, or a collapsed range) —\n // keep the existing reference rect rather than resetting to an invalid\n // one with non-finite values.\n if (!nativeClientRects.length) {\n return {};\n }\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 || clientRects[1].left > clientRects[0].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 return rectToClientRect({\n x: left,\n y: top,\n width: right - left,\n height: bottom - 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 return rectToClientRect({\n x: minLeft,\n y: top,\n width: maxRight - minLeft,\n height: bottom - 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(placement);\n const mainAxis = getOppositeAxis(crossAxis);\n let mainAxisCoord = coords[mainAxis];\n let crossAxisCoord = coords[crossAxis];\n const clampCoord = (axis, coord) => clamp(coord + overflow[axis === 'y' ? 'top' : 'left'], coord, coord - overflow[axis === 'y' ? 'bottom' : 'right']);\n if (checkMainAxis) {\n mainAxisCoord = clampCoord(mainAxis, mainAxisCoord);\n }\n if (checkCrossAxis) {\n crossAxisCoord = clampCoord(crossAxis, crossAxisCoord);\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 var _rawOffset$mainAxis, _rawOffset$crossAxis;\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: (_rawOffset$mainAxis = rawOffset.mainAxis) != null ? _rawOffset$mainAxis : 0,\n crossAxis: (_rawOffset$crossAxis = rawOffset.crossAxis) != null ? _rawOffset$crossAxis : 0\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// Method syntax keeps callback parameters bivariant, but expressing the\n// explicit `| undefined` required by `exactOptionalPropertyTypes` needs\n// property syntax, which is contravariant under `strictFunctionTypes`.\n// Extracting the function from a method position restores that bivariance so\n// consumers can still assign callbacks with narrower parameter types.\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 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 shiftData = state.middlewareData.shift;\n const noShift = !shiftData;\n let availableHeight = overflowAvailableHeight;\n let availableWidth = overflowAvailableWidth;\n if (shiftData != null && shiftData.enabled.x) {\n availableWidth = maximumClippingWidth;\n }\n if (shiftData != null && shiftData.enabled.y) {\n availableHeight = maximumClippingHeight;\n }\n if (noShift && !alignment) {\n if (isYAxis) {\n availableWidth = width - 2 * max(overflow.left, overflow.right);\n } else {\n availableHeight = height - 2 * 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","/**\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 var _padding$top, _padding$right, _padding$bottom, _padding$left;\n return {\n top: (_padding$top = padding.top) != null ? _padding$top : 0,\n right: (_padding$right = padding.right) != null ? _padding$right : 0,\n bottom: (_padding$bottom = padding.bottom) != null ? _padding$bottom : 0,\n left: (_padding$left = padding.left) != null ? _padding$left : 0\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","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).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 { Controller } from \"@hotwired/stimulus\"\n\n// Connects to data-controller=\"orbital-select\"\nexport default class extends Controller {\n static targets = [\"input\", \"label\"]\n static values = {\n selected: String,\n }\n\n connect() {\n // Initialize menu item states on connect\n this.updateMenuStates(this.selectedValue)\n }\n\n handleItemClick(event) {\n event.preventDefault()\n\n const menuItem = event.currentTarget\n\n // Don't select disabled items\n if (menuItem.dataset.disabled === \"true\" || menuItem.getAttribute(\"aria-disabled\") === \"true\") {\n return\n }\n\n const value = menuItem.dataset.value\n const label = menuItem.dataset.label\n\n this.selectOption(value, label)\n this.closeDropdown()\n }\n\n selectOption(value, label) {\n // Update hidden input value\n if (this.hasInputTarget) {\n this.inputTarget.value = value\n }\n\n // Update trigger label\n if (this.hasLabelTarget) {\n this.labelTarget.textContent = label\n this.labelTarget.classList.remove(\"Orbital-Select-Placeholder\")\n this.labelTarget.classList.add(\"Orbital-Select-Label\")\n }\n\n // Update stored value\n this.selectedValue = value\n\n // Update menu item selected states\n this.updateMenuStates(value)\n\n // Dispatch custom event for external listeners\n this.element.dispatchEvent(\n new CustomEvent(\"orbital:select:changed\", {\n bubbles: true,\n detail: { value, label },\n }),\n )\n\n // Trigger native change event on hidden input for form integration\n if (this.hasInputTarget) {\n this.inputTarget.dispatchEvent(new Event(\"change\", { bubbles: true }))\n }\n }\n\n updateMenuStates(selectedValue) {\n const menuItems = this.element.querySelectorAll(\".Orbital-Menu-Item\")\n\n menuItems.forEach((item) => {\n const itemValue = item.dataset.value\n const isSelected = itemValue === selectedValue\n\n // Update data attribute for CSS styling\n if (isSelected) {\n item.setAttribute(\"data-selected\", \"true\")\n item.setAttribute(\"aria-selected\", \"true\")\n } else {\n item.removeAttribute(\"data-selected\")\n item.setAttribute(\"aria-selected\", \"false\")\n }\n })\n }\n\n closeDropdown() {\n const container = this.element.querySelector('[data-controller=\"orbital-popover\"]')\n if (!container) return\n\n const app = this.application\n const popoverCtrl = app.getControllerForElementAndIdentifier(container, \"orbital-popover\")\n if (popoverCtrl) {\n popoverCtrl.hide()\n }\n }\n\n // Lifecycle callback when selected value changes externally\n selectedValueChanged() {\n this.updateMenuStates(this.selectedValue)\n }\n}\n"],"names":["$44e0f21d4eb6a5a0$var$isWebKitValue","$7356de1c3aaa9c7b$export$8d516e055d924071","$27d274cf1203127c$var$EventListener","eventTarget","eventName","eventOptions","unorderedBindings","Set","connect","addEventListener","disconnect","removeEventListener","bindingConnected","binding","add","bindingDisconnected","delete","handleEvent","event","extendedEvent","$27d274cf1203127c$var$extendEvent","stopImmediatePropagation","Object","assign","immediatePropagationStopped","call","bindings","hasBindings","size","Array","from","sort","left","right","leftIndex","index","rightIndex","$27d274cf1203127c$var$Dispatcher","application","eventListenerMaps","Map","started","start","eventListeners","forEach","eventListener","stop","values","reduce","listeners","map","concat","fetchEventListenerForBinding","clearEventListeners","clearEventListenersForBinding","handleError","error","message","detail","removeMappedEventListenerFor","eventListenerMap","fetchEventListenerMapForEventTarget","cacheKey","fetchEventListener","get","createEventListener","set","parts","keys","key","push","join","$27d274cf1203127c$var$defaultActionDescriptorFilters","value","stopPropagation","prevent","preventDefault","self","element","target","$27d274cf1203127c$var$descriptorPattern","$27d274cf1203127c$var$camelize","replace","_","char","toUpperCase","$27d274cf1203127c$var$namespaceCamelize","$27d274cf1203127c$var$capitalize","charAt","slice","$27d274cf1203127c$var$dasherize","toLowerCase","$27d274cf1203127c$var$hasProperty","object","property","prototype","hasOwnProperty","$27d274cf1203127c$var$allModifiers","$27d274cf1203127c$var$Action","descriptor","schema","$27d274cf1203127c$var$getDefaultEventNameForElement","tagName","$27d274cf1203127c$var$defaultEventNames","$27d274cf1203127c$var$error","identifier","methodName","keyFilter","forToken","token","eventTargetName","matches","source","descriptorString","content","trim","match","includes","window","document","split","options","test","toString","eventFilter","shouldIgnoreKeyboardEvent","filters","keyFilterDissatisfied","standardFilter","filter","keyMappings","shouldIgnoreMouseEvent","params","pattern","RegExp","name","attributes","$27d274cf1203127c$var$typecast","JSON","parse","o_O","meta","ctrl","alt","shift","modifier","metaKey","ctrlKey","altKey","shiftKey","a","button","form","details","input","e","getAttribute","select","textarea","Error","$27d274cf1203127c$var$Binding","context","action","actionEvent","prepareActionEvent","willBeInvokedByEvent","applyEventModifiers","invokeWithEvent","method","controller","actionDescriptorFilters","passes","entries","currentTarget","logDebugActivity","KeyboardEvent","MouseEvent","Element","contains","scope","containsElement","$27d274cf1203127c$export$12e07a2a9f87578a","delegate","mutationObserverInit","childList","subtree","elements","mutationObserver","MutationObserver","mutations","processMutations","observe","refresh","pause","callback","takeRecords","matchElementsInTree","has","removeElement","addElement","mutation","processMutation","type","processAttributeChange","attributeName","processRemovedNodes","removedNodes","processAddedNodes","addedNodes","elementAttributeChanged","matchElement","nodes","node","elementFromNode","processTree","elementIsActive","tree","processor","nodeType","Node","ELEMENT_NODE","isConnected","elementMatched","elementUnmatched","$27d274cf1203127c$export$fe68319d413d05cb","elementObserver","selector","hasAttribute","querySelectorAll","elementMatchedAttribute","elementUnmatchedAttribute","elementAttributeValueChanged","$27d274cf1203127c$export$e7aa7bc5c1b3cfb3","$27d274cf1203127c$export$8bd4ad37b76db6ba","valuesByKey","sets","hasKey","hasValue","some","getValuesForKey","getKeysForValue","_key","_values","$27d274cf1203127c$export$116e0b48509995b","_selector","matchesByElement","selectorMatchElement","selectorMatched","selectorUnmatched","_attributeName","matchedBefore","$27d274cf1203127c$export$da226bebbf7f6caa","stringMap","attributeOldValue","knownAttributeNames","refreshAttribute","oldValue","getStringMapKeyForAttribute","stringMapKeyAdded","stringMapValueChanged","stringMapKeyRemoved","currentAttributeNames","recordedAttributeNames","attribute","$27d274cf1203127c$export$3aa21c2f03ef6b3b","attributeObserver","tokensByElement","tokensMatched","readTokensForElement","unmatchedTokens","matchedTokens","refreshTokensForElement","tokensUnmatched","tokens","tokenMatched","tokenUnmatched","previousTokens","currentTokens","firstDifferingIndex","$27d274cf1203127c$var$zip","length","Math","max","findIndex","previousToken","currentToken","tokenString","$27d274cf1203127c$export$d27fa4c7330a452e","tokenListObserver","parseResultsByToken","WeakMap","valuesByTokenByElement","fetchParseResultForToken","fetchValuesByTokenForElement","elementMatchedValue","elementUnmatchedValue","parseResult","parseToken","valuesByToken","parseValueForToken","$27d274cf1203127c$var$BindingObserver","bindingsByAction","valueListObserver","actionAttribute","disconnectAllActions","connectAction","disconnectAction","clear","$27d274cf1203127c$var$ValueObserver","receiver","stringMapObserver","valueDescriptorMap","invokeChangedCallbacksForDefaultValues","invokeChangedCallback","writer","defaultValue","valueDescriptorNameMap","valueDescriptors","undefined","data","rawValue","rawOldValue","changedMethodName","changedMethod","reader","TypeError","descriptors","hasMethodName","$27d274cf1203127c$var$TargetObserver","targetsByName","disconnectAllTargets","connectTarget","disconnectTarget","_a","targetConnected","targetDisconnected","$27d274cf1203127c$var$readInheritableStaticArrayValues","constructor","propertyName","ancestors","$27d274cf1203127c$var$getAncestorsForConstructor","definition","$27d274cf1203127c$var$getOwnStaticArrayValues","isArray","getPrototypeOf","reverse","$27d274cf1203127c$var$OutletObserver","outletsByName","outletElementsByName","selectorObserverMap","attributeObserverMap","outletDefinitions","outletName","setupSelectorObserverForOutlet","setupAttributeObserverForOutlet","dependentContexts","observer","disconnectAllOutlets","stopSelectorObservers","stopAttributeObservers","outlet","getOutlet","connectOutlet","getOutletFromMap","disconnectOutlet","hasOutlet","hasOutletController","controllerAttribute","_element","getOutletNameFromOutletAttributeName","updateSelectorObserverForOutlet","outletConnected","outletDisconnected","selectorObserver","body","attributeNameForOutletName","outlets","getSelectorForOutletName","outletAttributeForScope","find","outletDependencies","dependencies","router","modules","module","controllerConstructor","dependentControllerIdentifiers","identifiers","contexts","getControllerForElementAndIdentifier","$27d274cf1203127c$export$841858b892ce1f4c","functionName","bindingObserver","dispatcher","valueObserver","targetObserver","outletObserver","initialize","parentElement","invokeControllerMethod","args","$27d274cf1203127c$var$getOwnKeys","getOwnPropertySymbols","getOwnPropertyNames","$27d274cf1203127c$var$extend","extendWithReflect","extended","Reflect","construct","arguments","create","setPrototypeOf","b","$27d274cf1203127c$var$Module","properties","shadowConstructor","shadowProperties","blessings","blessedProperties","blessing","$27d274cf1203127c$var$getShadowedDescriptor","shadowingDescriptor","getOwnPropertyDescriptor","defineProperties","contextsByScope","connectedContexts","connectContextForScope","fetchContextForScope","disconnectContextForScope","$27d274cf1203127c$var$ClassMap","getDataKey","getAll","getAttributeName","getAttributeNameForKey","$27d274cf1203127c$var$DataMap","setAttribute","removeAttribute","$27d274cf1203127c$var$Guide","logger","warnedKeysByObject","warn","warnedKeys","$27d274cf1203127c$var$attributeValueContainsToken","$27d274cf1203127c$var$TargetSet","targetName","targetNames","findTarget","findLegacyTarget","findAll","targets","findAllTargets","findAllLegacyTargets","getSelectorForTargetName","findElement","findAllElements","targetAttributeForScope","getLegacySelectorForTargetName","deprecate","targetDescriptor","targetAttribute","revisedAttributeName","guide","$27d274cf1203127c$var$OutletSet","controllerElement","outletNames","findOutlet","findAllOutlets","queryElements","matchesElement","$27d274cf1203127c$var$Scope","classes","closest","controllerSelector","documentScope","isDocumentScope","documentElement","$27d274cf1203127c$var$ScopeObserver","scopesByIdentifierByElement","scopeReferenceCounts","parseValueForElementAndIdentifier","scopesByIdentifier","fetchScopesByIdentifierForElement","createScopeForElementAndIdentifier","referenceCount","scopeConnected","scopeDisconnected","$27d274cf1203127c$var$Router","scopeObserver","modulesByIdentifier","loadDefinition","unloadIdentifier","connectModule","afterLoad","disconnectModule","getContextForElementAndIdentifier","proposeToConnectScopeForElementAndIdentifier","console","scopes","$27d274cf1203127c$export$1db618b7b2275ea1","enter","tab","esc","space","up","down","home","end","page_up","page_down","$27d274cf1203127c$var$objectFromEntries","c","n","array","memo","k","v","$27d274cf1203127c$var$getOutletController","$27d274cf1203127c$var$getControllerAndEnsureConnectedScope","outletController","$27d274cf1203127c$var$parseValueDefinitionPair","typeDefinition","$27d274cf1203127c$var$valueDescriptorForTokenAndTypeDefinition","payload","$27d274cf1203127c$var$parseValueTypeDefinition","typeFromObject","$27d274cf1203127c$var$parseValueTypeObject","typeObject","hasType","hasDefault","default","$27d274cf1203127c$var$parseValueTypeConstant","typeFromDefaultValue","$27d274cf1203127c$var$parseValueTypeDefault","propertyPath","typeFromConstant","$27d274cf1203127c$var$defaultValueForDefinition","constant","$27d274cf1203127c$var$defaultValuesByType","constantFromType","hasCustomDefaultValue","$27d274cf1203127c$var$readers","$27d274cf1203127c$var$writers","Boolean","Number","String","boolean","number","string","$27d274cf1203127c$var$writeJSON","stringify","$27d274cf1203127c$export$bd0bf19f25da8474","shouldLoad","_identifier","_application","dispatch","prefix","bubbles","cancelable","CustomEvent","dispatchEvent","classDefinition","targetDefinition","valueDefinitionPairs","pairs","valueDefinitionPair","$27d274cf1203127c$var$propertiesForValueDefinitionPair","read","write","result","valueDescriptor","outletDefinition","camelizedName","outletElement","$93031e4206e8e991$export$803cd8101b6c182b","$93031e4206e8e991$export$832b6fa47fa053d2","acc","side","$93031e4206e8e991$export$96ec731ed4dcb222","min","$93031e4206e8e991$export$8960430cfd85939f","$93031e4206e8e991$export$2077e0241d6afd3c","round","$93031e4206e8e991$export$a397704b5e280835","x","y","$93031e4206e8e991$var$oppositeSideMap","bottom","top","$93031e4206e8e991$export$fef61f332f2c0afc","param","$93031e4206e8e991$export$3c915306cb7fc97a","placement","$93031e4206e8e991$export$f0989780f32bfcda","$93031e4206e8e991$export$8a000a963141ac32","axis","$93031e4206e8e991$export$320bd9d53520c68a","$93031e4206e8e991$export$f28e8f882010718a","firstChar","$93031e4206e8e991$export$be42861551f17911","rects","rtl","alignment","alignmentAxis","mainAlignmentSide","reference","floating","$93031e4206e8e991$export$9c5e28bad23365fa","$93031e4206e8e991$export$2b182c584985588b","$93031e4206e8e991$var$lrPlacement","$93031e4206e8e991$var$rlPlacement","$93031e4206e8e991$var$tbPlacement","$93031e4206e8e991$var$btPlacement","$93031e4206e8e991$export$ee05aea0aeecbad4","rect","width","height","$28f1bf2594995773$var$computeCoordsFromPlacement","_ref","coords","sideAxis","alignLength","commonX","commonY","commonAlign","$28f1bf2594995773$export$37b6bde19b108ecc","state","_await$platform$isEle","_padding$top","_padding$right","_padding$bottom","_padding$left","platform","strategy","boundary","rootBoundary","elementContext","altBoundary","padding","paddingObject","clippingClientRect","getClippingRect","isElement","contextElement","getDocumentElement","offsetParent","getOffsetParent","offsetScale","getScale","elementClientRect","convertOffsetParentRelativeRectToViewportRelativeRect","$28f1bf2594995773$var$originSides","$44e0f21d4eb6a5a0$var$hasWindow","$44e0f21d4eb6a5a0$export$651544f548703224","$44e0f21d4eb6a5a0$export$8ee0fc9ee280b4ee","nodeName","$44e0f21d4eb6a5a0$export$38b2d434cce3ea22","_node$ownerDocument","ownerDocument","defaultView","$44e0f21d4eb6a5a0$export$e495491855dc5418","$44e0f21d4eb6a5a0$export$45a5e7f76e0caa8d","$44e0f21d4eb6a5a0$export$1b3bfaa9684536aa","HTMLElement","$44e0f21d4eb6a5a0$export$af51f0f06c0f328a","ShadowRoot","$44e0f21d4eb6a5a0$export$989e911fa9af580a","overflow","overflowX","overflowY","display","$44e0f21d4eb6a5a0$export$3735103072e4a80","$44e0f21d4eb6a5a0$export$89e651af02346cd4","_e","$44e0f21d4eb6a5a0$var$willChangeRe","$44e0f21d4eb6a5a0$var$containRe","$44e0f21d4eb6a5a0$var$isNotNone","$44e0f21d4eb6a5a0$export$d6c4e8150c35fed1","elementOrCss","css","transform","translate","scale","rotate","perspective","$44e0f21d4eb6a5a0$export$78551043582a6a98","backdropFilter","willChange","contain","CSS","supports","$44e0f21d4eb6a5a0$export$d1162fb0b6d4cd51","getComputedStyle","$44e0f21d4eb6a5a0$export$dc8fc79fa2800137","scrollLeft","scrollTop","scrollX","scrollY","$44e0f21d4eb6a5a0$export$4e12058fc4d51d56","assignedSlot","parentNode","host","$44e0f21d4eb6a5a0$export$7bf1f8740e3e34af","win","parent","frameElement","$729e420fd9c85e8f$var$getCssDimensions","parseFloat","hasOffset","offsetWidth","offsetHeight","shouldFallback","$","$729e420fd9c85e8f$var$unwrapElement","$729e420fd9c85e8f$var$getScale","domElement","getBoundingClientRect","isFinite","$729e420fd9c85e8f$var$noOffsets","$729e420fd9c85e8f$var$getVisualOffsets","visualViewport","offsetLeft","offsetTop","$729e420fd9c85e8f$var$getBoundingClientRect","includeScale","isFixedStrategy","isFixed","clientRect","visualOffsets","$729e420fd9c85e8f$var$shouldAddVisualOffsets","floatingOffsetParent","offsetWin","currentWin","currentIFrame","iframeScale","iframeRect","clientLeft","paddingLeft","clientTop","paddingTop","$729e420fd9c85e8f$var$getWindowScrollBarX","leftScroll","$729e420fd9c85e8f$var$getHTMLOffset","scroll","htmlRect","$729e420fd9c85e8f$var$getClientRectFromClippingAncestor","clippingAncestor","html","$729e420fd9c85e8f$var$getViewportRect","isLayoutViewport","clientWidth","clientHeight","layoutRelativeClientCoords","windowScrollbarX","doc","bodyStyles","bodyMarginInline","compatMode","marginLeft","marginRight","reservedWidth","abs","gutter","scrollbarGutter","scrollWidth","scrollHeight","direction","$729e420fd9c85e8f$var$isStaticPositioned","position","$729e420fd9c85e8f$var$getTrueOffsetParent","polyfill","rawOffsetParent","$729e420fd9c85e8f$var$getOffsetParent","svgOffsetParent","currentNode","$729e420fd9c85e8f$export$722a64dea1b767dc","topLayer","offsets","isOffsetParentAnElement","offsetRect","htmlOffset","clippingAncestors","$729e420fd9c85e8f$var$getClippingElementAncestors","cache","cachedResult","$44e0f21d4eb6a5a0$export$3b57c1601291186b","list","traverseIframes","_node$ownerDocument2","scrollableAncestor","$44e0f21d4eb6a5a0$export$7cd01a57c8ca906c","isBody","el","lastKeptComputedStyle","elementIsFixed","computedStyle","currentNodeIsContaining","lastPosition","ancestor","_c","firstRect","i","getElementRects","getOffsetParentFn","getDimensionsFn","getDimensions","floatingDimensions","$729e420fd9c85e8f$var$getRectRelativeToOffsetParent","getClientRects","isRTL","$729e420fd9c85e8f$export$cc800923e997bb8","fn","_middlewareData$offse","_middlewareData$arrow","middlewareData","diffCoords","$28f1bf2594995773$var$convertValueToCoords","isVertical","mainAxisMulti","crossAxisMulti","mainAxis","crossAxis","offset","arrow","alignmentOffset","$729e420fd9c85e8f$export$fba63a578e423eb","checkMainAxis","checkCrossAxis","limiter","detectOverflowOptions","detectOverflow","mainAxisCoord","crossAxisCoord","clampCoord","coord","limitedCoords","enabled","Stimulus","debug","logFormattedMessage","Promise","resolve","readyState","register","load","registerActionOption","head","rest","definitions","unload","controllers","onerror","groupCollapsed","log","groupEnd","imageError","hasImageTarget","imageTarget","style","hasFallbackTarget","fallbackTarget","trigger","toggle","bind","item","querySelector","dataset","once","open","dismissible","_handleKeydown","handleKeydown","_previouslyFocused","_originalStyles","_scrollY","openValue","requestAnimationFrame","show","_restoreScrollLock","activeElement","_applyScrollLock","_focusFirst","close","focus","_clearTurboFrame","backdropClick","dismissibleValue","_trapFocus","orbitalScrollLocked","htmlStyle","hasStableGutter","paddingRight","scrollbarWidth","innerWidth","_focusableElements","hasPanelTarget","panelTarget","focusable","preventScroll","first","last","frame","innerHTML","showDelay","hideDelay","boundShow","boundHide","hide","boundDelayedHide","delayedHide","boundUpdatePosition","updatePosition","boundOnNativeToggle","onNativeToggle","hideTimeout","triggerValue","setupHoverTrigger","setupClickTrigger","hasContentTarget","contentTarget","teardownTrigger","teardownPositioning","cancelShowTimeout","clearTimeout","newState","showPopover","calculatePosition","setupPositioning","popover","hidePopover","hideDelayValue","setTimeout","COMPASS_TO_PLACEMENT","ne","se","s","sw","w","nw","middleware","hasTriggerTarget","referenceEl","triggerTarget","floatingEl","positionValue","_middlewareData$autoP","_middlewareData$autoP2","_placementsThatFitOnE","allowedPlacements","autoAlignment","placements$1","allowedPlacementsSortedByAlignment","currentIndex","autoPlacement","currentPlacement","reset","alignmentSides","currentOverflows","allOverflows","overflows","nextPlacement","placementsSortedByMostSpace","d","resetPlacement","placementsThatFitOnEachSide","every","_middlewareData$flip","_middlewareData$flip2","_overflowsData$filter","_overflowsData$filter2","oppositePlacement","initialPlacement","fallbackPlacements","specifiedFallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment","initialSideAxis","isBasePlacement","hasFallbackAxisSideDirection","$93031e4206e8e991$var$getSideList","isStart","placements","overflowsData","flip","sides","nextIndex","currentSideAxis","mergedOptions","platformWithCache","config","platformWithDetectOverflow","statefulPlacement","resetCount","currentMiddleware","nextX","nextY","positionValueChanged","boundCancelHide","boundDelayedShow","showDelayValue","showTimeout","boundCancelShow","handleClick","handleToggle","firstItem","items","getEnabledItems","focusNext","focusPrevious","focusFirst","focusLast","activateItem","closeMenu","focusItemStartingWith","child","children","classList","active","indexOf","updateFocus","enabledItems","subController","click","lowerKey","startIndex","text","textContent","startsWith","submenu","_onClickOutside","refocus","current","selected","updateMenuStates","selectedValue","handleItemClick","menuItem","disabled","label","selectOption","closeDropdown","hasInputTarget","inputTarget","hasLabelTarget","labelTarget","remove","Event","menuItems","itemValue","container","popoverCtrl","app","selectedValueChanged","id","openModal","openDialog","modal","getElementById"],"version":3,"file":"index.js.map"}